3 Replies Latest reply on Feb 6, 2014 9:13 AM by lmgood

    GREP & footnote spacing


      People send me Word documents to put into an academic journal in InDesign. Word puts spaces before and between in-line superscripted footnote references. I need to remove all those spaces. I'm new to GREP, but I'm sure there's a way to do this that I haven't figured out yet. (example: "care: 1, 2" where the numbers and spaces are superscripted)


      Currently using CS5 on Windows 7.

        • 1. Re: GREP & footnote spacing
          Peter Spier Most Valuable Participant (Moderator)

          Can you show us an example of the way the text looks when it comes in, and waht you want it to look like? Hard to picture from the description.

          • 2. Re: GREP & footnote spacing
            Peter Kahrel Adobe Community Professional & MVP

            To remove spaces before footnote references, search for \s+(?=~F) and leave the Change To field empty. You must exclude the footnotes themselves because ~F finds footnote numbers too and you want to skip those.


            \s         one or more spaces

            ~F        footnote marker


            (?=  )  is a so-called lookahead. In \s+(?=~F) it means 'find spaces that are followed by a footnote marker'



            2 people found this helpful
            • 3. Re: GREP & footnote spacing
              lmgood Level 1

              Thank you, Peter K! That was almost exactly what I needed. Unfortunately, because the text is imported from Word, InDesign doesn't recognize them as footnote markers, so I changed it to \s+(?=\d) with the format "superscript." Two hundred changes at the click of a button. Whew!