Back

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

  • You must be logged in to reply to this topic.Login

GREP to avoid long number figures to split?

Return to Member Forum

  • Author
    Posts
    • #56051
      Al
      Member

      Hi, This is the easy way, I know but, does anyone know how to make a GREP to keep long number-figure together? like £1 525 698?

      Thanks

    • #56053
      David Blatner
      Keymaster

      You could apply a grep style that applies a “no break” character style, using this code: £d[ds]+

    • #56057
      Al
      Member

      Thanks Mr Blatner (or David) :)

      I am new defining GREP sentences and scripting, a completely beginner but I need to do this change on a long document as a matter of urgency. My problem is that I aleready knew how to find the numbers using the same code you have suggested £d[ds]+, but I don't know what to put under Change to:

      Alfonso

    • #56059

      David suggested a GREP style, so it gets applied automatically (or perhaps automagically) when and where necessary. The character style would only need the “no break” attribute selected.

      If you want to search-and-replace, you can still use a character style (with No Break) so you can find/change it later on, or just set “No Break” in the Change Formatting box.

      Don't use the first option if you may already have used character styles for formatting the numbers. This new replace-op will remove the former formatting style.

      Don't use the second option if you have a strong dislike of the “Paragraph +”, as it only applies the No Break in the volatile 'local' way.

      GREP Styles have neither of these disadvantages, plus (the biggest one of all) they get automatically applied and removed where and when necessary. All in all, if you have CS4 or newer, GREP styles are the best.

    • #56062
      Al
      Member

      Hi,

      Thanks for your explanation. I understand what you are saying thanks. One doubt about it. I have created quite a few paragraph styles for contents, tables, etc, shall I apply that GREP style to the basic paragraph style as is the one others are based on?

      I have found a problem apllying that GREP style. Is not working, must be something I have missed btu I can't see what

    • #56064
      Al
      Member

      OK, looks like it works!

      I would have prefer to get a nonbreaking space between the group of numbers (fix width) but will be ok for the moment.

      Thanks

Viewing 5 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads