Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Find/Change text + glyph in CS6, perhaps using InDesign GREP?

Contributor ,
May 04, 2024 May 04, 2024

We are trying to check for errors in a dictionary and wonder if it's possible to use Find/Change to search for a letter (for example, A) in Arial that is attached to a glyph (wingding) and replace it with A-space-glyph.

 

A second search would be for a glyph (wingding) attached to a letter in Arial and replace it with the wingding glyph-space-letter. See screenshot with an example for each of these Find/Change functions

 

If this is possible, please give detailed info and perhaps even a screenshot. . If we can get it to work, we would go through the alphabet (new searches for each letter). I read about InDesign GREP and wonder if this might be the way to do it.Find Replace glyph letter.png

 

Thanks.

 

TOPICS
How to
1.5K
Translate
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

correct answers 1 Correct answer

Community Expert , May 04, 2024 May 04, 2024

GREP sounds complicated and risky for our situation. We have proofread the book 3 times and think the glyph/spacing issue is about 98% correct. We were wondering if there's an easy way to give it a final check.

 

Not really, with the text formatting you've chosen. The three-step process is not particularly difficult and would cost nothing to try — on a copy of your work file/s, of course.

 

A potentially simpler approach would be to replace all instances of the glyph with [space][glyph][space],

...
Translate
Community Expert ,
May 04, 2024 May 04, 2024

Is the glyph consistent? Or do you need to search for 'any character' in Wingdings, and a letter?

Translate
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
Contributor ,
May 04, 2024 May 04, 2024
quote

Is the glyph consistent? Or do you need to search for 'any character' in Wingdings, and a letter?


By @James Gifford—NitroPress

It is consistent, the lozenge glyph used in the screenshot.

Translate
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
Community Expert ,
May 04, 2024 May 04, 2024

Then you can use it as a literal in the search string, which makes it easy. Just cut and paste into both search and find fields, as needed.

 

I take it the other character can be any letter? Always uppercase, or?

Translate
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
LEGEND ,
May 04, 2024 May 04, 2024
quote

Then you can use it as a literal in the search string, which makes it easy. Just cut and paste into both search and find fields, as needed.

 

I take it the other character can be any letter? Always uppercase, or?


By @James Gifford—NitroPress

 

But then, as @Eugene Tyson discovered - you'll lose formatting - either on "A" or the glyph - depends on the order.

 

Translate
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
LEGEND ,
May 04, 2024 May 04, 2024

You can't search for different fonts - at least not in vanilla InDesign - but you could search for a pair of characters using "look ahead" / "look behind" to get a reference of one or the other.

 

Your diamond glyph has some Unicode value - so you could search for it before or after "A". 

 

If it's only this diamond shape - you could either use Clipboard as a replacement...

 

... Or you don't really need GREP for this.

Replace your diamond glyph with some unique string - #diamond# - work on it as it has Arial font applied:

 

#diamond#A -> A #diamond#

 

then replace this unique string back with diamond glyph styled with an extra CharStyle and Wingding font. 

 

But if you would prefer GREP solution - it would be helpful to know surroundings of the text(s) you want to process - so can you post some screenshots with real texts - with hidden characters visible? 

 

Translate
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
Contributor ,
May 04, 2024 May 04, 2024
quote

Your diamond glyph has some Unicode value - so you could search for it before or after "A". 

 

If it's only this diamond shape - you could either use Clipboard as a replacement...

 

... Or you don't really need GREP for this.

Replace your diamond glyph with some unique string - #diamond# - work on it as it has Arial font applied:

 

#diamond#A -> A #diamond#

 

then replace this unique string back with diamond glyph styled with an extra CharStyle and Wingding font. 

 

But if you would prefer GREP solution - it would be helpful to know surroundings of the text(s) you want to process - so can you post some screenshots with real texts - with hidden characters visible? 

 


By @Robert at ID-Tasker

We do not necessarily want to use GREP; just read about it for the first time today. We just want to use Find/Replace the one wingding character (Unicode F074).

 

In short, we want to check over 63,000 entries to be sure there is one space both before the after the lozenge wingding character, the space being preceded or followed by a letter in uppercase.

 

We could not find a way to have a search include both "text" and a "glyph". If you're able to post a screenshot of how to do this, it would be most helpful. Thanks.

 

Thanks.

Translate
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
LEGEND ,
May 04, 2024 May 04, 2024
quote
 

We could not find a way to have a search include both "text" and a "glyph". If you're able to post a screenshot of how to do this, it would be most helpful. 


By @lekkerder

 

Select this diamond shape, copy, go to Find field, paste, add "A" before/after - Search. 

 

Translate
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
Contributor ,
May 04, 2024 May 04, 2024
quote

Select this diamond shape, copy, go to Find field, paste, add "A" before/after - Search. 


By @Robert at ID-Tasker

Our InDesign guy may have tried that, but I'll run it by him. Would be great if that does it! Thanks.

Translate
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
LEGEND ,
May 04, 2024 May 04, 2024
quote
quote

Select this diamond shape, copy, go to Find field, paste, add "A" before/after - Search. 


By @Robert at ID-Tasker

Our InDesign guy may have tried that, but I'll run it by him. Would be great if that does it! Thanks.


By @lekkerder

 

Yes, it will work. 

 

InDesign is 100% UNICODE - so you can copy any text and paste it into Find field - special glyphs / characters will be converted though - to \something for Text or ^something for GREP. 

 

Translate
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
Community Expert ,
May 04, 2024 May 04, 2024

Using Robert's suggestion of a double switch — replace the glyph with a unique text string, then use a more standard search or grep process, then switch the text marker back to the glyph — maybe choosing one from within an extended text font, rather than a symbol font — seems like the right approach to me.

Translate
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
LEGEND ,
May 04, 2024 May 04, 2024
Translate
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
Contributor ,
May 04, 2024 May 04, 2024
Translate
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
Community Expert ,
May 04, 2024 May 04, 2024

When I do this grep search it works

\<\u\K(?=)|()(\u)

 

But it changes the font --- 

EugeneTyson_0-1714837257197.png

Never noticed it did that before

Thought it only swapped 2 with 1

 

Odd.

 

Translate
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
LEGEND ,
May 04, 2024 May 04, 2024

@Eugene Tyson

 

Because when you change found result - InDesign is changing text contents - so any "extra" formatting is lost.

 

That's why I've suggested look ahead / behind - or simply replacing this glyph with some unique text. 

 

Translate
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
Community Expert ,
May 04, 2024 May 04, 2024

Yeh was just looking at doing both at the same time

But you can't. 

I even applied character styles to the letters and it swaps the character styles.

That seems like very unwanted buggy behaviour. 

Translate
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
Community Expert ,
May 04, 2024 May 04, 2024

We'd have to ask someone like Peter Kahrel — and even he may not know — but I think the GREP method for storing text fragments is 'destructive' in that it converts the content to standard ASCII. That is, it doesn't store it the way regular cut or copy does.

Translate
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
LEGEND ,
May 04, 2024 May 04, 2024
quote

We'd have to ask someone like Peter Kahrel — and even he may not know — but I think the GREP method for storing text fragments is 'destructive' in that it converts the content to standard ASCII. That is, it doesn't store it the way regular cut or copy does.


By @James Gifford—NitroPress

 

No, not ASCII - it's still full UNICODE - but like I've said earlier - InDesign is treating found result - as a bunch of characters without distinguish which character has which formatting - the whole string is treated as formatted the same way. 

 

Translate
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
Contributor ,
May 04, 2024 May 04, 2024
quote

We'd have to ask someone like Peter Kahrel — and even he may not know — but I think the GREP method for storing text fragments is 'destructive' in that it converts the content to standard ASCII. That is, it doesn't store it the way regular cut or copy does.


By @James Gifford—NitroPress

GREP sounds complicated and risky for our situation. We have proofread the book 3 times and think the glyph/spacing issue is about 98% correct. We were wondering if there's an easy way to give it a final check.

Translate
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
LEGEND ,
May 04, 2024 May 04, 2024
quote
quote

We'd have to ask someone like Peter Kahrel — and even he may not know — but I think the GREP method for storing text fragments is 'destructive' in that it converts the content to standard ASCII. That is, it doesn't store it the way regular cut or copy does.


By @James Gifford—NitroPress

GREP sounds complicated and risky for our situation. We have proofread the book 3 times and think the glyph/spacing issue is about 98% correct. We were wondering if there's an easy way to give it a final check.


By @lekkerder

 

In that case you shouldn't do Find&Change - just search for the "wrong" combinations and rather fix them manually. 

 

If you work on a PC - you could use free version of my ID-Taker tool - you can then search for each part separately and combine results. 

 

If you can send me an example - INDD file with a one or two pages - I can help you with the process. 

 

Translate
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
Contributor ,
May 04, 2024 May 04, 2024
quote

In that case you shouldn't do Find&Change - just search for the "wrong" combinations and rather fix them manually. 

 

If you work on a PC - you could use free version of my ID-Taker tool - you can then search for each part separately and combine results. 

 

If you can send me an example - INDD file with a one or two pages - I can help you with the process. 

 


By @Robert at ID-Tasker

 

Ah, find errors and fix manually rather than automatically with Find/Replace. Sounds wise. If we can't get that to work, I'll send you an INDD file with a sample page. Very kind of you to offer. We will work on the Find/Replace later today (or at the very latest, tomorrow) and I'll post again about the results or send you a sample page.

 

Many thanks!

Translate
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
LEGEND ,
May 04, 2024 May 04, 2024

@lekkerder

 

You are welcome. 

 

You can send me sample file anyway - click on my nickname to send it on priv - always looking for new ideas. 

 

Translate
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
Community Expert ,
May 04, 2024 May 04, 2024

GREP sounds complicated and risky for our situation. We have proofread the book 3 times and think the glyph/spacing issue is about 98% correct. We were wondering if there's an easy way to give it a final check.

 

Not really, with the text formatting you've chosen. The three-step process is not particularly difficult and would cost nothing to try — on a copy of your work file/s, of course.

 

A potentially simpler approach would be to replace all instances of the glyph with [space][glyph][space], then replace all double spaces with single ones until no doubles are left.

Translate
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
Contributor ,
May 04, 2024 May 04, 2024
quote

A potentially simpler approach would be to replace all instances of the glyph with [space][glyph][space], then replace all double spaces with single ones until no doubles are left.


By @James Gifford—NitroPress

This sounds like a good idea. One of the Find/Replace strings we were planning to do is to search for double spaces and replace with a single space, but we hadn't considered dealing with the glyph that way too. Thanks!

Translate
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
Community Expert ,
May 04, 2024 May 04, 2024

IMVHO, stripping double spaces, return-space and space-return combinations is an essential late/last stage cleanup for publication. (Also space-tab and tab-space, and for meticulously formatted work, multiple tabs and returns.)

 

You should be able to squeeze this glyph check/fix into that. 🙂

Translate
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