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

Hyphenation

Return to Member Forum

  • Author
    Posts
    • #102550
      Clark Kenyon
      Participant

      Is there a way of setting up a paragraph style so that ID will not hyphenate a word that already has a hyphen in it, e.g., a compound word?

    • #102552
      Anonymous
      Inactive

      Notify me of follow-up replies via email

    • #102566
      Graham Park
      Member

      Will this work for you?
      Add a GREP to the style to find words with a Hyphen in them and add a no break character style

      Apply Style
      No Break
      To Text
      \w+\-\w+

      • #102570

        Graham–that looks great (so simple). I normally just search for hyphens and replace with hyphen followed by a discretionary hyphen. I like your GREP style.

        One question–but the line can break after the hyphen, right? For example: “extra-virgin olive oil” will break after “extra-“?

        Asking because I only know the very basics of GREP.

    • #102572

      Not sure Graham’s answer is correct!

      I think Clark wants no supplementary hyphen in a composed word!

      Best,
      Michel, from FRIdNGE
      michel.allio.fridnge@gmail.com

    • #102576
      Graham Park
      Member

      You both could be correct.
      I’ll wait for Clark responses to see what he is trying to do in more detail.

    • #102580
      Graham Park
      Member

      How about
      A Find and Replace for the hyphen to add a discretionary line break after it.
      The add NO BREAK style with GREP to the first word up the and including the hyphen.

      Apply Style
      No Break
      To Text
      \w+\-

      This will keep the first word and the hyphen together and then break or not as required after this.

    • #102582
      Clark Kenyon
      Participant

      That’s right. I’m working with an editor who objects every time she sees a compound word hyphenated at the end of a line, so it looks like it has two hyphens in it (this particular book has a lot of compound words). She also doesn’t like it when a word immediately following an em-dash is hyphenated (I never put spaces before and after and em-dash; just doesn’t look right to me). So Graham’s GREP style should work, as I am highlighting these compound/hyphenated words and applying no break from the control panel to them.

    • #102583
      Vinny –
      Member

      Here’s another trick:
      instead of using a “non-breaking” character style, you can use a “no-language” instead.
      This should prevent compound word from hyphenation while keeping the ability to break after the dash.
      I made a quick test using \w+(?=-)|(?<=-)\w+ regex and it seems OK, but should probably be tested on a real project.

    • #102584

      Hmm! …

      Really not sure trying to play this question with Grep could be pro-workable! …

      Best,
      Michel, from FRIdNGE
      michel.allio.fridnge@gmail.com

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