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, the need to select non-styled spaces in-between a character style

Return to Member Forum

  • Author
    Posts
    • #60188

      I have a client that wants to have bold text to look like it's been highlighted with a highlight pen. The text is originaly bold so I made it first into a character style and then change that character style to underline which is thickened and offset to give a highlight effect… so far so good, then I realise that some times the space when to words are bold is not always highlighted. But GREP styles cannot look for underlined text so how can I make the spaces the same character style? I only whant this to happen if the space is BETWEEN two words that have this character style, not a space trailing a highlighted word.

      Thank you

      Lukas

    • #60194

      Best I can think of is searching for a not-underlined space that has nothing left and right:

      (?s)(?<!.) (?!.)

      (with “Underline Off” in Search Formatting.)

      1. You can not use this in a GREP Style either, as it relies on the Underline Off attribute
      2. Watch out, as I suspect it may also find single spaces inside tables (those also don't have a not-underlined character to its left and right).
    • #60196

      Thanks, needed a little modification:

      The underlined must be a character style. otherwise, since there isn't a NOT function in the find/change dialogue

      (?s)(?<!.) (?!.)

      1) I changed the space to “s”

      2) In the find i set it to “[None]”, since this finds text that does not have a specifeid caracter format.

      3) In the change format chage to the underlined Character style.

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