Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Page Numbering of Table of Contents Yielding Non-Sequential Results

Explorer ,
Jul 06, 2023 Jul 06, 2023

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.


TOPICS
Bug , How to
776
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 06, 2023 Jul 06, 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.

Translate
LEGEND ,
Jul 06, 2023 Jul 06, 2023

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

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 06, 2023 Jul 06, 2023

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 06, 2023 Jul 06, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 06, 2023 Jul 06, 2023

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 06, 2023 Jul 06, 2023

Thank you so much, running that simple script worked!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 06, 2023 Jul 06, 2023

Here is a screen capture of the TOC setup dialog in InDesignTOC Screen.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 06, 2023 Jul 06, 2023

Great news! I'm going to point the InDesign team to this thread and let them know there's a problem.

 

Note that if you want to be able to edit the document easily in the future, you make the changes in your threaded original document, save, make a copy, and run the script on the copy. It's a workaround, and I'm glad we know what the problem is, but it's awkward. I've now passed the information to the InDesign team.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 15, 2025 Aug 15, 2025
LATEST

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???

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines