Copy link to clipboard
Copied
Due to the discussion in the thread here: https://forums.adobe.com/thread/2596476
I was wondering if there is a Grep expression that could be used to apply a character style to Hebrew characters only (based on their position in the font map) to allow changing of the font of just those characters? I'm pretty good at find/replace but really don't know anything about using Grep. If Grep could do something like this it would save me a tremendous amount of time as I normally use English fonts that do not contain a Hebrew character set and need to apply a character style to each bit of Hebrew (which is interspersed within the English) to change it to a font with Hebrew characters.
I would think this might be possible with Grep. If anyone knows how, please let us know.
Like Chad, I don't know a single word (or even letter, for that matter) in Hebrew, but here's my exercise, just for fun. I went from the opposite: find all non-Latin text and punctuation/spaces after it. 3 regexes to include in para style:
[^A-Za-z\h[:punct:]]+
[^A-Za-z[:punct:]]\K\h
[^A-Za-z]\K[[:punct:]]\h
​
Copy link to clipboard
Copied
Tá´€W wrote
I haven't read the entire thread, but from my extensive experience typesetting predominantly English books with interspersed Hebrew, the best way to apply a character style to the Hebrew is to search for all text that has its language set to Hebrew!
...
Note, though, that for this to work you must first save an docx documents as the older .doc format in Word. The import filter in InDesign for .docx documents isn't as robust as the earlier .doc import filter, and only the older one imports language markings properly.
I just tested this and you are correct, with one additional point. Even a .docx file retains the Hebrew style, IF you place the document with the "remove styles and formatting" option (which is my preference for the files I get for these jobs). If you place a .docx file and preserve or map styles, then the Hebrew style is not retained.
This may be helpful in some situations, but when I have a .docx file and want to preserve or map styles, then winterm's method may be simpler as I don't need to go through the extra step of opening and resaving the Word file.
I am sure that there will be some times though that I will prefer to use your method.
Copy link to clipboard
Copied
I always import with styles and formatting, and strip everything out afterwards in InDesign (after freezing any wanted formatting with character styles).
The problem with a GREP search to find Hebrew strings is that it's impossible to sort out the issue of opening and closing punctuation, because only a human can know whether the opening or closing punctuation is meant to be Hebrew or not. So what happens in practice is that you have to go through each Hebrew phrase and check (or compare to original) which is a pain.
But if you rely on the language setting, most times (if the author was half competent at inputting the original text) the issue of punctuation etc. will be mostly okay...
In any case, I've never found a GREP expression that really worked for me.
Copy link to clipboard
Copied
Tá´€W wrote
I always import with styles and formatting, and strip everything out afterwards in InDesign (after freezing any wanted formatting with character styles).
The problem with a GREP search to find Hebrew strings is that it's impossible to sort out the issue of opening and closing punctuation, because only a human can know whether the opening or closing punctuation is meant to be Hebrew or not. So what happens in practice is that you have to go through each Hebrew phrase and check (or compare to original) which is a pain.
But if you rely on the language setting, most times (if the author was half competent at inputting the original text) the issue of punctuation etc. will be mostly okay...
In any case, I've never found a GREP expression that really worked for me.
Thanks for pointing that out. I will have to try it both ways and see what works. For a large block of Hebrew, your method is probably better for the reasons you've explained. However, much of what I get is just scattered Hebrew words within primarily English text, and for that the GREP formatting may be the fastest solution.
I appreciate your pointing that out.
Copy link to clipboard
Copied
I use
â€[‬\x{05D0â€}-‬\x{05EAâ€}‬\x{0591â€}-‬\x{05C4â€}‬\x{05A2â€}-‬\x{05C7â€}]+‬