Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Can't find quote marks and endnotes in GREP at same time

Explorer ,
Oct 28, 2021 Oct 28, 2021

Copy link to clipboard

Copied

I need to insert a hair space between a closing quote and an end notereference using GREP.

 

I can find the closing quote mark by using ~}

 

I can find an endnote reference number (which is no longer a digit) with ~U

 

But putting the two together like this ~}~U finds nothing.

 

Why does this not work?

 

Thanks,

Tom

TOPICS
How to

Views

68

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Oct 28, 2021 Oct 28, 2021

Copy link to clipboard

Copied

Hi @Tom Tomasko,

I tried this and got the same results as you, this seems to be a bug. What is interesting is that the following works

~}~F

So the endnote reference is found using the footnote reference. However, if you just try to find endnote using ~F it fails, it works only in this combination. Also the pattern endnote followed by closing quote is found using ~U~} so looks like a bug to me.

-Manan

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Oct 29, 2021 Oct 29, 2021

Copy link to clipboard

Copied

Bug known! …

 

A way to play the game is to first "mark" the endnote char with a condition:

 

Find ~U

Replace by: "temp" condition

 

Then:

 

Find .(?!\X) + no condition

Replace by: $0~<

 

Finally trash the "temp" condition.

 

(^/)  The Jedi

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 29, 2021 Oct 29, 2021

Copy link to clipboard

Copied

LATEST

Thanks Jedi, but I see a problem in your method. You are looking for every endnote reference and changing it to a temp condition. But that wipes out all the endnotes. But this method seems to work.

 

Find: (~U)

Change: xyz$1  Now all endnotes start with xyz, whether or not the endnote is preceeded by an closing quote but the end note number remains.

 

Find: (~})xyz

Change: $1~<  Now all closing quotes with the temp condition after have a thin space in between the quote and the endnote.

This however leaves any endnote reference number that does not follow a closing quote with the xyz temp condition. Since this temp condition does not appear anywhere else in the text (something weirder than xyz should be used) you:

Find: xyz

Change: nothing

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines