Back

If your email is not recognized and you believe it should be, please contact us.

Forum Replies Created

Viewing 4 posts - 46 through 49 (of 49 total)
  • Author
    Posts
  • in reply to: Paragraph Style with auto fractions and normal integers #57050
    Chuck Nigash
    Member

    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.

    in reply to: Paragraph Style with auto fractions and normal integers #57049
    Chuck Nigash
    Member

    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.

    in reply to: Paragraph Style with auto fractions and normal integers #57048
    Chuck Nigash
    Member

    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.

    in reply to: Paragraph Style with auto fractions and normal integers #57047
    Chuck Nigash
    Member

    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?

Viewing 4 posts - 46 through 49 (of 49 total)