7 Replies Latest reply on Jan 25, 2017 2:04 PM by Dative

    Superscript shortcut

    Dative Level 1

      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!

        • 1. Re: Superscript shortcut
          tpk1982 Level 4

          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

          2 people found this helpful
          • 2. Re: Superscript shortcut
            Dative Level 1

            Thanks! I'll give it a try later.

            • 3. Re: Superscript shortcut
              Sandee Cohen Adobe Community Professional

              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

              1 person found this helpful
              • 4. Re: Superscript shortcut
                Dative Level 1

                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!

                • 5. Re: Superscript shortcut
                  Sandee Cohen Adobe Community Professional

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

                  • 6. Re: Superscript shortcut
                    Dative Level 1

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

                    • 7. Re: Superscript shortcut
                      Dative Level 1

                      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.