Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Footnote Special Character / Marker

Return to Member Forum

  • Author
    Posts
    • #114208

      Greetings all,

      I have been looking everywhere and have found every other character except the one I need: The Footnote Number Special Character.

      Situation: I have an autofitted text with footnotes dynamically inserted from a script. This document is hundreds of pages long with hundreds of footnotes. The insertion of the footnotes is super easy, but I wanted to reset the numbering of the footnotes on each page which means I need to dynamically generate the number in the footnote itself through variables.

      It’s easy to insert it: Type > Insert Special Character > Markers > Footnote Number // BUT I can’t seem to find this special character reference in any of the docs, online, or even on the google 0 . o

      Do you know how to insert this special character via script?

    • #114219

      Maybe I’m misunderstanding your question, but in the footnote options you can set the footnote number to start again on every new page.

    • #114232

      Thanks, but I am looking for the actual character that gets inserted when you do “Type > Insert Special Character > Markers > Footnote Number”. I need to use that character in a script…

    • #114235
      Peter Kahrel
      Participant

      You find that the way you find the script code for any InDesign marker: insert it in the Find/Change dialog and you’re there. In this case, open the Find/Change dialog, click the @ next to the ‘Find what’ field, click ‘Markers’ then ‘Footnote reference marker’. You’ll now see ~F in the ‘Find what’ field and that’s what you use in your script:

      app.findGrepPreferences.findWhat = ‘~F’;

      (or ^F if you use text rather than grep).

      Peter

    • #114239

      Thanks Peter, thats actually a very helpful trick. I didn’t realize you could insert them into the find/change dialog.

      So, I tried using these in the script with:

      var footnote = tf.footnotes.add(LocationOptions.AFTER, location)
      footnote.contents = “^F” + text.toString()

      Tried ^F, \^F \~F and ~F and none of them will insert the special character. Do you have any insight into how to insert the actual character into the footnote with script?

    • #114241
      Peter Kahrel
      Participant

      So you want to insert the footnote number. But InDesign adds that when you create the footnote.

    • #114242

      When I only do the footnote the number doesn’t show up. For instance, with this code below:

      var footnote = tf.footnotes.add(LocationOptions.AFTER, location)
      footnote.contents = text.toString()

      It only shows like this:

      ” text from the footnote”

      The number in the text shows up properly, but the actual footnote at the bottom of the page doesn’t show. Someone would need to manually count the footnotes to know which one they’re reading.

      I am expecting it to show up like:

      “1 text from the footnote”

      Does this make sense? That’s why I am looking to insert the footnote special character with the script. I understand that the footnote special character is already added when you create it in the UI though.

    • #114270

      I just found this statement in an IDML documentation https://wwwimages.adobe.com/content/dam/acom/en/devnet/indesign/sdk/cs6/idml/idml-cookbook.pdf:

      “There is no reference for these characters so you’ll have to experiment…”

      That’s awesome.

    • #114272

      So, apparently I wasn’t very far off. I found this awesome Unicode chart:

      https://www.indiscripts.com/blog/public/data/idcs4-special-characters/en_InDesignCS4-CS5-SpecialChars.pdf

      And using an insertion script like:

      footnote.contents = “\u0019” + text.toString()

      Works just fine but for some reason the 0x0004 doesn’t work (footnote reference number).

      So does anyone have any thoughts on how to insert this?

    • #114273
      Peter Kahrel
      Participant

      > When I only do the footnote the number doesn’t show up. For instance, with this code below:

      > var footnote = tf.footnotes.add(LocationOptions.AFTER, location)
      > footnote.contents = text.toString()

      The number doesn’t show up because you delete it by replacing all the footnote content. You should add the text after the footnote number and the separator:

      footnote.insertionPoints[-1].contents = ‘whatever’;

    • #114275

      Thats. Amazing. Thank you so much! Works perfectly.

    • #114351

      Quite surprising: the official code SpecialCharacters.FOOTNOTE_SYMBOL does not insert anything at all! “Undo” also says “Undo Insert Text” as if something was inserted. But there is nothing there.

      Other codes such as SpecialCharacters.AUTO_PAGE_NUMBER and SpecialCharacters.TRADEMARK_SYMBOL *do* work as expected.

    • #14324233
      Ariel W
      Participant

      Just been bitten by this myself. It is strange that there does not seem to be a way to insert a footnote reference marker in a footnote via scripting.
      Peter’s workaround is to create a new footnote and not delete the auto-created footnote number. But as Jongware points out, it should work using the SpecialCharacter enumerator as well.

    • #14324217

      Ariel, this is still so in the Very Latest™ version? If so, about time to post a Bug Report.

Viewing 13 reply threads
  • You must be logged in to reply to this topic.
Forum Ads