0

So I've two Paragraph Styles on the page and they are both parts of the title in separate Text Boxes.

Paragraph Style 1 "Section Title" Paragraph Style 2 "Page Topic"

When I make the TOC style with these two and then output, it will create a new line of each Paragraph style.

So it will be

Section Title .... Page #

Page Topcic ... Page #

What I want it to do is

Section Title Page Topic ... Page #

How would I do this?

I have tried to make both Text Boxes the same Paragraph Style and then added a Char Style to one (for the styling difference)

I have also tried to create a text variable (and assigned it, its own Paragraph style - Paragraph 3) to target both the Paragraph Styles and then used Paragraph 3 to create TOC, but the TOC was empty.

0

There's a trick using two text boxes linked + the same paragraph style with a Grep

enter image description here

  • Place the Section Title and the Page Topic at the same text box and same style
  • Insert a double space separation between them
  • The paragraph style must have No Hyphenation
  • Reduce the Title Text Box size until showing just the title and link it with a new text box to show the Page Topic content
  • Add this GREP Style: \s\s.+ to apply a character style to all the characters after a double space (the Page Topic content)
  • Make the TOC with this paragraph style
0

You can just put the TOC entry as a single in a text frame that is above the page, so that the text is off of the page and doesn't appear when printed. The TOC function will still see this for the purpose of building the TOC. In order to avoid double entries in the TOC, use your target paragraph styles only in the hidden text box, and use identical paragraph styles in the body copy.

  • that requires more work, if I need to make a change, I would have to make it two places rather than one. – Aasim Azam May 23 at 13:24
  • That is true, but it gives full control without the need to use GREP. ALso, you can use Find/Replace if you need to edit text in those parts in a single step. You aren't going to achieve your objective without adding at least a little more work. If Danielillo's solution works better for your document with less effort, then you should go with it. Best of luck! – 13ruce May 23 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.