Skip to main content
Participating Frequently
August 3, 2026
Question

[JSX] Force Footnote Numbering to Restart per unthreaded Story on the same Page/Spread?

  • August 3, 2026
  • 9 replies
  • 61 views

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:

  1. I know that doc.footnoteOptions.restartNumbering only accepts Page, Spread, or Section parameters. It completely ignores Story boundaries if the stories share the same geographic page space.

  2. 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 a startAt property for text frames or stories.

  3. 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).

  4. 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!

    9 replies

    Peter Kahrel
    Community Expert
    Community Expert
    August 3, 2026

    Can you show the INDD after you split the story with your script? Something odd is going on. Footnote numbering should restart at the beginning of the story. Maybe something is off in your file.

    HEAJHPAuthor
    Participating Frequently
    August 4, 2026

    Could it be in the script? It's a very specific script designed to meet a particular need. Unfortunately, I can't share the file with you.

    Peter Kahrel
    Community Expert
    Community Expert
    August 4, 2026

    As a first step, create a sample document and run the script. If the problem is present in this sample document, please share it.

    rob day
    Community Expert
    Community Expert
    August 3, 2026

    When it detects a specific paragraph style (acting as a section divider), it physically splits the TextFrame at that exact paragraph

     

    Hi ​@HEAJHP , I’m guessing there is a reason you are not doing this, but rather than splitting the text frame, couldn’t you insert a Frame Break Character at the end of the paragraph style marker?

     

     

    HEAJHPAuthor
    Participating Frequently
    August 3, 2026

    I need to split the text to change the number of columns. But if you have an idea—with that paragraph-end character of yours...that intrigues me. Tell me more. 

    rob day
    Community Expert
    Community Expert
    August 3, 2026

    I need to split the text to change the number of columns.

     

    Column count is a text frame preferences property, so something like this:

     

    //story 1
    var s = app.activeDocument.stories[0];
    //story 1 paragraph 2
    var bp = s.paragraphs[1]
    //insert frame break
    bp.insertionPoints[0].contents = SpecialCharacters.FRAME_BREAK
    //set break frame column count
    var cc = bp.parentTextFrames[0].textFramePreferences.textColumnCount = 2

     

    Before and after

     

     

    Frans v.d. Geest
    Community Expert
    Community Expert
    August 3, 2026

    Serious question: did you try debugging the script in Gemini/ChatGPT/Claude? I’ve done some good ‘vibecoding’ in all three, one debugging the other, all in the free versions.

    HEAJHPAuthor
    Participating Frequently
    August 3, 2026

    I often switch between Gemini and ChatGPT to deal with my problem