I have a GREP find to select a fraction-now, how to style it?

Hello

I've been playing with GREP on my own and with the help of other people on this forum.

Here's my next challenge, I came up with a way to find a fraction. Here is my code GREP:

( ? < ! /) \d + / ? \d+ ( ! /)

Say we get 3/4

Now I have to do the following

I have a style of character for the slash, the numerator and the denominator, and I need to apply.

So, if I can figure that out, I'll have to do an advanced search or the postanalyse change the kerning between these 3 characters.

I tried all sorts of things, but I don't have not been successful. Is it still possible?

Anyone out there for the challenge ;-)

Thank you

Babs

This seems to work for the GREP styles. We did when we need fractions and do not use an opentype font. The good thing is, once you integrate it with her in your paragraph style, it will ALWAYS be applied when he sees a split, even if you type in later. In other words, you will never need to re-run a search/replace to do this.

In your paragraph style dialog box, choose GREP styles and set up as shown in the screenshot below. If you want it to look in the numerator or the denominator for fractions with more than one digit, add one more after the "d". Just keep in mind, it automatically finds things like dates (08/06/10) or things like "50-50" that you can not set as fractions, so be careful. You may need to create a fourth style of GREP, once find you here where you want kerning applied, or if you want to change the track of Unity (slash, numerator and denominator).

Let us know how it goes!

Tags: InDesign

Similar Questions

Maybe you are looking for