Skip to main content
Known Participant
January 25, 2017
Question

Superscript shortcut

  • January 25, 2017
  • 3 replies
  • 1981 views

I'm working on a document with superscript endnote numbers within the text. I copied over the text from a word document, in the word document the endnote numbers ascend to the end of the chapter and then reset at the beginning of the next, however when I copied them over InDesign renumbered them so they now ascend continuously through the book. Annoyingly I didn't realise and set the book and the author now wants them back as they were.

They're all set to a character style and I've been speculating on the quickest way of changing them (through GREP or other means). I thought the community might have some bright ideas?

Thanks in advance!

This topic has been closed for replies.

3 replies

DativeAuthor
Known Participant
January 25, 2017

Ah wow, I did think there was probably an easier way. The other solution worked but I'll change it to the more functional approach. Thanks!

Sandee Cohen
Legend
January 25, 2017

Just a little note. I should have shown the screen shot to Restart Every "Section" not Page.

DativeAuthor
Known Participant
January 25, 2017

Haha yeah that's alright, I realised, I already have the sections, I just had no knowledge of the numbering and formatting section!

Sandee Cohen
Legend
January 25, 2017

Whoah!

Using a script is way over the top. This route is much simpler as you can turn the option on or off as your client changes his/her mind.

Go to the page that starts each chapter. And choose Numbering and Section options from the Pages panel menu. Simply click to make that a new section.

With all the chapters starting a section, then choose Type > Document Footnote Options and set the "Restart Every Section" option.

tpk1982
Legend
January 25, 2017

use the below script.. select every chapter and run the script.. it will reset to 1 to

app.findGrepPreferences = null;     app.changeGrepPreferences = null; 

app.findGrepPreferences.findWhat = "\\d+";

app.findGrepPreferences.appliedCharacterStyle  = "Endnote reference"; //change the character style name here

app.findGrepPreferences.position = Position.SUPERSCRIPT;

list = app.selection[0].findGrep(true);

changes = 1;

n=list.length;

for (i=0; i<list.length; i++)

{

app.changeGrepPreferences.changeTo = String(changes);

list[--n].changeGrep();

changes++;

}

alert ("Number of changes: "+i);

app.findGrepPreferences = null;     app.changeGrepPreferences = null; 

HTH

K

DativeAuthor
Known Participant
January 25, 2017

Thanks! I'll give it a try later.