Skip navigation
Currently Being Moderated

interesting grep problem

Jul 17, 2013 2:20 AM

I want to make my fractions bigger , so I set a new character style and applied a grep style

lovely

but I dont want my fractions in the parenthesis to change at all

take a look: 

 

Screen Shot 2013-07-17 at 5.14.21 AM.png

 

see how it got too big? 

 
Replies
  • Currently Being Moderated
    Jul 17, 2013 7:55 AM   in reply to jerugalhelp

    A little patience, please. A lot of the regulars, including me, are usually asleep when you posted.

     

    If all the numbers are preceeded by the tab and have no fracrions, then (?<=\t)\d+ should work, but I really don't know what numbers you want to change besides the first number...

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 17, 2013 8:34 AM   in reply to jerugalhelp

    Just the fraction, or the whole numbers too? Is there ever any text between the parenthesis and the first digit?

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 17, 2013 8:35 AM   in reply to Peter Spier

    And are these "real" fractions (single glyphs for the whole fraction included in the font) or fractions made by typing digits and the slash?

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 17, 2013 9:41 AM   in reply to jerugalhelp

    Off the top of my head the only way I can think of to do this is to create a class with all the fraction characters you will be using and use a negative look-behind, like this: (?<!\(\d*)[½¼¾⅓⅔⅛⅜⅝⅞]

     

    I created that class by making a text frame in ID, then double-clicking the fraction glyphs in the Glyphs panel to enter them in the frame, then copied and pasted them between the brackets for the class in my GREP.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 17, 2013 9:46 AM   in reply to Peter Spier

    OK, that  displayed badly....

     

     

    (?<!\(\d*)[½¼¾⅓⅔⅛⅜⅝⅞]

     

    Should be all together.

     

    This will find any fraction in the list that was entered as a glyph (it will NOT find typed fractions to which the OpenType Fractions property is assigned) and also that is not preceeded by an open parenthesis and 0 or more digits.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points