Hyphenation
Learn / Forums / General InDesign Topics / Hyphenation
- This topic has 10 replies, 6 voices, and was last updated 6 years ago by Vinny –.
-
AuthorPosts
-
-
March 21, 2018 at 11:51 am #102550Clark KenyonParticipant
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?
-
March 21, 2018 at 1:42 pm #102552AnonymousInactive
Notify me of follow-up replies via email
-
March 21, 2018 at 2:59 pm #102566Graham ParkMember
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 styleApply Style
No Break
To Text
\w+\-\w+-
March 21, 2018 at 3:09 pm #102570Dwayne HarrisMember
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.
-
-
March 21, 2018 at 3:15 pm #102572Michel Allio for FRIdNGEParticipant
Not sure Graham’s answer is correct!
I think Clark wants no supplementary hyphen in a composed word!
Best,
Michel, from FRIdNGE
[email protected] -
March 21, 2018 at 3:24 pm #102576Graham ParkMember
You both could be correct.
I’ll wait for Clark responses to see what he is trying to do in more detail. -
March 21, 2018 at 6:16 pm #102580Graham ParkMember
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.
-
March 21, 2018 at 9:22 pm #102582Clark KenyonParticipant
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.
-
March 22, 2018 at 3:32 am #102583Vinny –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. -
March 22, 2018 at 3:37 am #102584Michel Allio for FRIdNGEParticipant
Hmm! …
Really not sure trying to play this question with Grep could be pro-workable! …
Best,
Michel, from FRIdNGE
[email protected]-
March 22, 2018 at 3:41 am #102585
-
-
-
AuthorPosts
- You must be logged in to reply to this topic.