InDesign's paragraph numbering works fine within stories, but across stories it all goes haywire. When numbered paragraphs are in different stories InDesign numbers them not according to their position in the document, but in the order in which they were created.
So when you add a new story between the first and the second one, and all three stories contain paragraphs using the same numbered paragraph style, the numbering will be off. The numbering can be corrected by the script described here (link at the foot of this page).
The script has no interface. Place the cursor in an instance of a numbered paragraph and run the script from the Scripts panel. The script targets only the instances of the selected paragraph style. So if you use paragraph numbering for figure and table captions, and these two types of caption use different paragraph styles, you'll have to run the script twice: once for the figure captions and once for the table captions.
Any cross-references to these paragraph numbers are preserved and are updated automatically. If you add or remove paragraphs using the numbered style you'll need to run the script again.
The idea behind the script is simple: at each instance of the numbered paragraph style, set its start number. In the interface you can set a number in the Bullets and Numbering window (Type > Paragraph, then select Bullets and Numbering...' from the Paragraph panel's fly-out menu):
Note that it's still InDesign that numbers the paragraphs, the script doesn't add numbers. Therefore cross-references to any of the numbers continue to work.
Note: Make sure that you enable 'Continue numbers across stories' in the list used in the paragraph style:
26 Oct 2024: First posted.
Consider making a donation. To make a donation, please press the button below. This is Paypal's payment system; you don't need a Paypal account to use it: you can use several types/brands of credit and debit card.
Installing and running scripts
Questions, comments? Get in touch