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

Superscript shortcut

Participant ,
Jan 25, 2017 Jan 25, 2017

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!

2.0K
Translate
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
Guide ,
Jan 25, 2017 Jan 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

Translate
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
Participant ,
Jan 25, 2017 Jan 25, 2017

Thanks! I'll give it a try later.

Translate
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
Mentor ,
Jan 25, 2017 Jan 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.

Section start.png

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

Restart each section.png

Translate
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
Participant ,
Jan 25, 2017 Jan 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!

Translate
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
Mentor ,
Jan 25, 2017 Jan 25, 2017

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

Translate
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
Participant ,
Jan 25, 2017 Jan 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!

Translate
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
Participant ,
Jan 25, 2017 Jan 25, 2017
LATEST

I realised that annoyingly neither method works, the superscript for the typeface I've used isn't built in to the typeface, it's just a set of glyphs so they can't just be changed numerically, I'll have to type them manually. Unless there's a way I can tell indesign to find a number and replace it with a specific glyph and at the same time get it to renumber the entire section for me.

Translate
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