Ever since they came out in CS4, I’ve been fascinated by GREP styles and the amazing things you can do with them.
The problem
One small part of what I do involves setting a mixed Chinese/English publication and I have been on the look out to find some way to use just one base paragraph style for both the English and the Chinese content. The problem is that a lot of Chinese fonts have absolutely horrible Latin characters, and so I need to be able to switch between two different fonts depending on whether the characters are English or Chinese.
The solution – GREP Styles
GREP styles are at least on the way to making this happen for me. After creating a Character Style for the Chinese font, I then assign it to the standard English Paragraph Style as the following GREP Style which I found on the Adobe Forums ad then tweaked with some additional goodness:
[\x{2E80}-\x{9FBB}\x{3000}-\x{303F}\x{FF01}-\x{FF60}]+
That even handles some of the slightly more obscure “non-Chinese” characters that I’ve only ever come across in Chinese text such as Fullwidth Colons (:) and Fullwidth Commas (,)!
So what this actually does is prevents any of the dreaded crossed boxes.