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?
when you make your TOC you have to do second step
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:
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.
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.
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.
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.
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:
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.
C) I created a new style, and named it ToC Entry for Section Hed. Specs are listed in the screen capture below:
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:
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.
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.
That's shown in the edit box as ^m. Click the OK button, and the end result should look much like this:
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.