• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Endnotes to end of the book endnotes

Enthusiast ,
Oct 27, 2022 Oct 27, 2022

Copy link to clipboard

Copied

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.

TOPICS
How to , Scripting

Views

214

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 27, 2022 Oct 27, 2022

Votes

Translate

Translate
Community Expert ,
Oct 27, 2022 Oct 27, 2022

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 27, 2022 Oct 27, 2022

Copy link to clipboard

Copied

Thanks a ton for the help.

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

Shahid

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 31, 2022 Oct 31, 2022

Copy link to clipboard

Copied

I tried the script.

 

It worked like a charm, however, it could not remove <?> sign. I had to remove it manually.
Thanks for the help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 31, 2022 Oct 31, 2022

Copy link to clipboard

Copied

LATEST

 it could not remove <?> sign

I'll look into it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines