Skip to main content
January 24, 2014
Answered

Footnote Reference No

  • January 24, 2014
  • 1 reply
  • 615 views

Hello,

I'm actually working a script (js), which needs to list the position of all footnote reference number found in the document.  To be noted that a paragraph style has been applied on the whole text and the reference number is no more by default in superscript. In fact that's the goal of the script: to convert back the detected reference number to superscript. Does someone have an idea?

Thanking you in advance

This topic has been closed for replies.
Correct answer LeftHead

doReplacement();

function doReplacement () {

     app.findGrepPreferences = NothingEnum.nothing;

     app.changeGrepPreferences = NothingEnum.nothing;

     app.findChangeGrepOptions.includeFootnotes = false;

     app.findGrepPreferences.findWhat = "~F";

     app.changeGrepPreferences.position = Position.SUPERSCRIPT;

     app.documents[0].changeGrep();

}

If you also want to change the position of the reference number inside the footnote, turn the "includeFootnotes" option to true

1 reply

LeftHeadCorrect answer
Inspiring
January 24, 2014

doReplacement();

function doReplacement () {

     app.findGrepPreferences = NothingEnum.nothing;

     app.changeGrepPreferences = NothingEnum.nothing;

     app.findChangeGrepOptions.includeFootnotes = false;

     app.findGrepPreferences.findWhat = "~F";

     app.changeGrepPreferences.position = Position.SUPERSCRIPT;

     app.documents[0].changeGrep();

}

If you also want to change the position of the reference number inside the footnote, turn the "includeFootnotes" option to true

January 24, 2014

Thnx LeftHead! That's exactly what the script needs to do! Thnx again