Skip to main content
Bedazzled532
Inspiring
October 27, 2022
Answered

Endnotes to end of the book endnotes

  • October 27, 2022
  • 1 reply
  • 557 views

I have approx 30 chapters in a book and each  chapter contains endnotes.

 

I want to accumulate all the endnotes at the end of the book and not at the end of the chapter.

I have copy pasted the end notes in a text frame and all the numbers have changed to <?>

 

I am trying to write a script which will convert the <?> back to numbers

Here is the copy of the script:

 

d = app.documents[0];
app.findGrepPreferences = null;
app.findGrepPreferences.findWhat = '~F';
fn = d.findGrep();
//alert(fn.length);

// Get a handle on the story's text frames
frames = fn[0].parentStory.textContainers;

for (i = frames.length-1; i >= 0; i--)
{
notes = frames[i].footnotes.everyItem().getElements();

}

 

I have no clue to to put the numbers at the beginning of the line thus replacing <?>

 

Any help would be appreciated.

Thanks.

This topic has been closed for replies.

1 reply

Peter Kahrel
Community Expert
Peter KahrelCommunity ExpertCorrect answer
Community Expert
October 27, 2022
Bedazzled532
Inspiring
October 28, 2022
Thanks a ton for the help.

I'll try the solution as soon as possible and update.

Shahid