Copy link to clipboard
Copied
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.
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.
Copy link to clipboard
Copied
Probably, because those sidebars are not anchored in the main Story?
Copy link to clipboard
Copied
Thank you for your response. Alan Gilberton's suggestion fixed the issue.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Also, can you include a screenshot of all the settings you used to setup the TOC?
Copy link to clipboard
Copied
Thank you so much, running that simple script worked!
Copy link to clipboard
Copied
Here is a screen capture of the TOC setup dialog in InDesign
Copy link to clipboard
Copied
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.