Using GREP Paragraph Style for footnote reference

Learn / Forums / General InDesign Topics / Using GREP Paragraph Style for footnote reference

Viewing 1 reply thread
  • Author
    Posts
    • #99772
      Jerod Brown
      Participant

      I am a beginner when it comes to using GREP with paragraph styles. I am working on a financial document that has a lot of linked excel documents placed inside the InDesign file.

      I have my paragraph style, cell styles and table style setup so when the excel documents have updated the InDesign file will maintain all of the styling/formatting.

      Since I am bringing everything in, including the footnotes on the excel document i cannot use the footnote function within InDesign. So I was trying to use a GREP expression to turn my footnote reference numbers at the end of lines to superscripts. I have a Superscript character style setup, and the first expression I tried was:

      \d\> so that worked great and all of the last numbers (footnote references) on my line turned to superscripts.

      But the problem is now, i have some lines that have for example “June 30” at the end of a line in the financial documents, so that expression is turning the “0” to a superscript as it is the last digit on that line.

      Is there a way that i could exclude “30” from the expression? Also i think i am going to run into this later, when I have some footnote references with years, so 2017(superscript 1), then 2016, 2015 etc (some would not have the footnote, and those it would turn the last digit to a superscript.

      Any help from the experts would be awesome and much appreciated from this beginner.

    • #99783
      David Blatner
      Keymaster

      That’s a difficult problem. GREP styles only work well when there are very clear patterns. If the patterns are murky, it’s hard.

      One option is to add another special character before the numbers you want to be superscript. For example, see this article:
      https://creativepro.com/auto-format-superscript-and-subscript-numbers-using-grep-styles.php

Viewing 1 reply thread
  • You must be logged in to reply to this topic.
>