[JSX] Force Footnote Numbering to Restart per unthreaded Story on the same Page/Spread?
Hi everyone,
I am working on a rather complex JSX script for a multi-section publication. I’ve hit a wall regarding InDesign’s native footnote engine behavior, and I’m hoping someone here might know a hidden trick or undocumented DOM property.
The Context: My script processes a continuous text flow. When it detects a specific paragraph style (acting as a section divider), it physically splits the TextFrame at that exact paragraph. It breaks the threading, resulting in two completely independent, unlinked Stories sitting on the same page or spread.
The Problem: Even though the text is now split into two separate, unthreaded Stories, InDesign's footnote engine continues the numbering across them. If Story A ends at footnote 12, Story B (the new section) starts at footnote 13.
I need the footnote numbering to restart at 1 for Story B.
What I know / What I've tried:
-
I know that
doc.footnoteOptions.restartNumberingonly accepts Page, Spread, or Section parameters. It completely ignores Story boundaries if the stories share the same geographic page space. -
I looked into
textFrameFootnoteOptions.enableOverrides = true, but the DOM only exposes layout properties here (separator line color, weight, etc.). There doesn't seem to be astartAtproperty for text frames or stories. -
I am aware of the "Fake Footnote Hack" (setting the native marker to 0.1pt with a "None" swatch, and injecting hardcoded text like
"(1) - "using the script). -
Converting to Endnotes is not an option for the editorial team; they must remain at the bottom of the page.
My Question: Before I fully commit to implementing the "fake footnote" hack in my production script, I wanted to ask the experts: Is there any native workaround, clever sectioning trick via script, or hidden DOM property to force a footnote restart per Story on the same page?
I have a ~1500 line script handling the splitting and formatting, and I'd be happy to share specific snippets if it helps.
Thank you in advance for your insights!
