Skip to main content
Participant
September 14, 2021
質問

Want to have my TOC call out a series of pages instead of individual pages

  • September 14, 2021
  • 返信数 4.
  • 304 ビュー

このトピックへの返信は締め切られました。

返信数 4

Dave Creamer of IDEAS
Community Expert
Community Expert
September 15, 2021

I've used a "brute force" method for this in the past.

 

Throughout the document, create and use three styles for each section

  • SectionHead_Start
  • SectionHead_Middle (other styles are based on this one)
  • SectionHead_End

 

In the TOC, look for the Start and End styles in the documents. (It was a multi-chapter directory.)

Format them to two separate styles in the TOC.

TOC_SectHead_Start

TOC_SectHead_End (based on TOC start)

 

After the generation of the TOC, I would use a saved GREP query to look for the TOC_SectHead_End text through the tab and replace an En dash. Then replace the TOC_SectHead_Start paragraph return and replace with nothing. (I used a utility to automate the two searches.) 

 

The only downside is that I had to run the search after every TOC update, but it only took a few seconds.

David Creamer: Community Expert (ACI and ACE 1995-2023)
Mike Witherell
Community Expert
Community Expert
September 15, 2021

Yes, I don't like using the index for a toc, but it can do page range options for you. See "Page Range Options in Indexes":

https://helpx.adobe.com/indesign/using/creating-index.html

That would be a neat trick in the ToC generator.

Mike Witherell
Peter Spier
Community Expert
Community Expert
September 14, 2021

I used to use the following GREP query (coutesy of Peter Kahrel, I believe) to consolidate "Index to Advertiser" lisitings that were really a TOC in a directory:

 

Find: ^(.+ )([\d, ]+)\r\1([\d, ]+)$

Change: $1$2, $3

 

As I recall you need to run it until it finds no more matches.

Peter Spier
Community Expert
Community Expert
September 15, 2021

That isn't going to give you your dash separated ranges, but it will set you up to do that manually when you see the consolidations.

 

And a note on why one might choose to do this with a TOC rather than as an index... You can have as many TOCs as you like in your document, but only one index (unless I've mised a new feature), and you likely wouldn't want to use up that general index capability for something like this.

Mike Witherell
Community Expert
Community Expert
September 14, 2021

The index panel can do that. You could then style it to look like a ToC.

Mike Witherell