Have an account? Sign in
"*" indicates required fields
You agree that CreativePro Network may send you emails, including the newsletter selections above. You can unsubscribe at any time.
By signing in, you agree to our Terms of Use and acknowledge our Privacy Notice.
New user? Create an account
By signing in, you agree to our Terms of Use and acknowledge our Privacy Notice.
Nailed it ! ! !
d+[/]+d* is the equation you want.
It will find any digit, add the forwardslash character in the mundane fraction 123/190 for instance, find any digit again and Repeat Zero or More Times, thus capturing the last digits.
Guys, I've tried editing the html to show, visually, the backslash-d code (twice) in the GREP, but it's not sticking. Additionally, upping an image doesn't seem possible if the image does not have a URL. I hope anyone who follows this thread puts this together.
It is interesting to follow this post and ironic. I have included the all-important backslash key as did kfhking. But the web template here on InDesign Secrets is knocking it out and it significantly alters how you code.
Here is what I've tried. We need a GREP wizzard. :-)
d+[/] will find something as weird as 1024/
d+[/]+d will find 1024/1 but it wont find 1024/128 for instance. Getting the GREP to look to the end of the last digit is the key.
I experimented with Positive Look Behind among other Matches, but did not find a good result.
I also experimented with undocumented GREPs such as p{decimal_digit_number} for digits 0 to 9 but that had no impact as well. That is not capturing whole numbers such as 1024. The GREP must capture all the digits so we can convert them to the character style and create the fraction.
Hrumph! I set that up and tried it but it returned a zero.
Find: d+/d+
Change: d+/d+
Find format: Ch Style = any style, Prgh Style = Basic Para (you'd normally input your desired style)
Change format: Ch Style = fractions, Prgh Style = Basic Para (you'd normally input your desired style)
kfhking, did you get a positive result?
This site uses cookies, but not the kind you eat. We use cookies to remember log in details, provide secure log in, improve site functionality, and deliver personalized content. By continuing to browse the site, you accept cookies.