Skip to main content
ACrosby
Known Participant
July 6, 2023
Answered

Page Numbering of Table of Contents Yielding Non-Sequential Results

  • July 6, 2023
  • 3 replies
  • 828 views

After generating a table of contents in InDesign (v. 18.1). I noticed that the page numbering is out of sequence.

 

I've asked InDesign to include in the TOC all level 1 and level 2 heads. The generated table of contents lists everythng from the beginning of the document in linked text boxes, front to back, correctly. But after the highest page number, the numbers continue again, but from lower numbers.

 

A good example included in my screen capture images is that there are two TOC entries on page 14, but then after that the TOC shows two entries for page 7.

 

There are several 'sidebars' throughout the 18-page project file. The out-of-sequence page numbers all belong to H1 or H2 heads contained in those sidebars. So what InDesign is doing is listing all of the 'main' items first in the TOC, and then going through again and listing all of the sidebar H1 & H2 items.
Is this a bug? Is there a fix? (Please see both attached screen capture images)
I'm using a Macbook Pro on OS Ventura 13.4.1. Thanks.


Correct answer AlanGilbertson

Based on your description, here is a test that would help to narrow down the problem: In a copy of your document, run the SplitStory script you'll find in the scripts panel under Application > Samples > JavaScript, then generate the TOC. If the problem is that the TOC is processing the threaded frames (the main story) first and then the sidebars, you should have a normal TOC. That would be a bug. If the TOC is still incorrect, we'll have to dig deeper.

3 replies

Known Participant
August 15, 2025

I'm experiencing the same issue in ID 2025 where a chapter number (e.g., "1") is in a separate text box than the main threaded story. When generating the TOC, even though the style for the separate chapter number is set as LEVEL 1 (and it is the ONLY Level 1), it is getting processed at the bottom of the entire TOC. Originally the chapter number was in a box on the parent page and on a separate layer. I moved the text box with the chapter number to the correct page (i.e., not the parent page) and put it on the same layer as the text. I also tried bringing it to front and moving the box to the top left corner of the page (e.g., the coordinates of the box make it the first item on the page). I also tried putting the text box on a layer above the layer with the main threaded text. All these options failed.

 

I also tried inserting a chapter number variable as a running header on the parent page, and the actual page. Both items ended up at the bottom of the TOC entries from the threaded text. I also tried changing the text from a digit to a single character to see if it was due to the content being a single digit. No dice.

 

What's going on? Is this how it's supposed to work? Everything in the TOC has to be threaded into the main text???

 

AlanGilbertson
Community Expert
AlanGilbertsonCommunity ExpertCorrect answer
Community Expert
July 6, 2023

Based on your description, here is a test that would help to narrow down the problem: In a copy of your document, run the SplitStory script you'll find in the scripts panel under Application > Samples > JavaScript, then generate the TOC. If the problem is that the TOC is processing the threaded frames (the main story) first and then the sidebars, you should have a normal TOC. That would be a bug. If the TOC is still incorrect, we'll have to dig deeper.

Eric Dumas
Community Expert
Community Expert
July 6, 2023

Also, can you include a screenshot of all the settings you used to setup the TOC?

Robert at ID-Tasker
Legend
July 6, 2023

Probably, because those sidebars are not anchored in the main Story?

 

ACrosby
ACrosbyAuthor
Known Participant
July 6, 2023

Thank you for your response. Alan Gilberton's suggestion fixed the issue.