1

I'm having trouble finding a sequence that works it InDesign to move full stops (US English: periods) before footnote(s) when they trail the superscripted endnote references to a word/phrase.

so make thisfoo<sup>23,25<sup/>. into thatfoo.<sup>23,25<sup/> ( tags not literally there just indicating to you the reader these are numbers in superscript but Markdown doesn't do superscript I think)

because my positive look behind is not working I'm look to use a sequence of two or morepositive lookbehind` tokens, but is this inside the rules?

I wrote a GREP token that hits all the endnotes references, whatever combination of spaces, commas and digits. But I can't replace with found in InDesign because it breaks all the hyperlinks to the endnotes. So I need to use positive lookahead and positive lookbehind to move the full stops. First remove the existing then add the new one before the endnotes. But the same token, say this one of many possible to pick up any of

{n, n, n…} —> \d[\d\, \,]+ (and I add '\.' to catch the period) will not get a single hit as an argument for a positive-lookbehind token

i.e. (?<=\d[\d\, \,]+)\. doesn't get a hit. tried various variations too. and lookahead. What about what ID calls "unmarking subexpressions" which Text Wrangler I think refers to as Perl-Style Pattern Expressions?

I can use negative lookbehind to find periods following digits+ i.e. (?<![a-zA-Z])\. but it won't give me the entire endnotes references sequence to mark and put a period preceding it.

This GREP is all executed within Adobe InDesign layout software, so no command line execution. It's okay if I use two operations not all done with one Find/Change operation. First add preceding period. Second remove trailing period.

enter image description here

i want to remove the period char at green arrow and add one at the red arrow for any given series of endnote reference numbers and commas. The central problem is that found hits on endnote strings CANNOT be used in the Change To token as found strings because that will remove their (hidden) indexing as Cross-References linking them to Endnotes which will result in hyperlink connections in exported PDF (amongst other reasons). (ignore the Find token in the screenshot)

wide_eyed_pupil
  • 3,153
  • 7
  • 24
  • 35
  • I don't see an MCVE. What's the full expression and command line arguments you've tried? – Karoly Horvath Nov 03 '15 at 14:47
  • I don't know InDesign but I do know regular expressions: why not simply match `([\d,]+)\.` and replace with `.$1`? – Kenney Nov 03 '15 at 14:57
  • hey that would be excellent if you could match character or paragraph styles on certain parts of the query but you can only match for the entire expression in InDesign. (the was just to show they are super script, it's not literally in the text. Like I said, you can find and replace because the found string will lose it's very important hidden cross-reference link to the End Notes. These are important because they create a hyperlink when you output to PDF and also allow tracing/switching to pages from a reference to the endnote and back inside InDesign. – wide_eyed_pupil Nov 03 '15 at 15:38
  • I'll update the question to reflex the InDesign specifics of the execution. But most GREP tokens should work. no need for command line execution it's all inside an InDesign "Find and Change To" panel. – wide_eyed_pupil Nov 03 '15 at 15:41

0 Answers0