Converting Existing Footnotes to End-notes Selectively.

Learn / Forums / General InDesign Topics / Converting Existing Footnotes to End-notes Selectively.

Viewing 1 reply thread
  • Author
    Posts
    • #104289
      Apurva Ashar
      Participant

      The book that I am working on has large number of footnotes on every page: typically 15 to 30! Some of them are just meanings/synonyms for a given word while some are elaborate notes running in number of lines.

      The main text is mostly verses/lines of poems. So we have planned a page with large margin on one side and moving single word notes as margin notes (using end-notes). My option is to remove (Cmd-X) the small, one letter footnotes and insert them as end notes. Then manually flow the end note story in the margin besides the main story in a new text box.

      The question is, is there any option which will convert an existing footnote into an end-note and not require cut and paste? Just being optimistic here ;-)

    • #104357
      Peter Kahrel
      Participant

      Interesting. The below script does what you want. An alternative would be to place the sidenotes anchored frames (a variant of https://www.kahrel.plus.com/indesign/sidenotes.html). This alternative requires the set-up of some styles but is probably easier to use in the long run.

      Anyway, here’s the script. Select the footnote you want to convert and run the script.

      Peter

      function () {
        if (app.selection.length && app.selection[0] instanceof Character && app.selection[0].contents == SpecialCharacters.FOOTNOTE_SYMBOL) {
          var sep = app.documents[0].footnoteOptions.separatorText.length;
          var story = app.selection[0].parentStory;
          var n = story.insertionPoints.itemByRange (0, app.selection[0].index).footnotes.length;
          var fnote = story.footnotes[n];
          var ix = fnote.storyOffset.index;
          var enote = fnote.storyOffset.createEndnote();
          // InDesign adds a space after the new endnote, delete it.
          if (story.characters[p+1].contents == ' ') {
            story.characters[p+1].contents = '';
          }
          fnote.characters.itemByRange (0, sep+1).contents = '';
          fnote.texts[0].move (LocationOptions.AFTER, enote.insertionPoints[-1]);
          fnote.remove();
        }
      }());
Viewing 1 reply thread
  • You must be logged in to reply to this topic.
>