Thanks for coming to InDesignSecrets.com, the world's #1 resource for all things InDesign!

When a Hyphenated Word Won’t Break at the End of a Line

This mystery was driving me crazy… why won’t the hyphenated word “fitting-room” break at the hyphen?

why won't think word break

Instead, it forces the word “fitting” to hyphenate, leaving a large white space. I tried switching between paragraph composer to single-line composer; I tried adjusting the Hyphenation settings, and the Justification settings; I tried stomping my feet and using strong language. It just wouldn’t work the way it “should.”

Of course, I put the word “should” in quotes because what we believe is right and what InDesign believes is right are not always the same thing. And, especially in today’s political climate, it’s important that we remember to seek first to understand, then be understood. (A great old Covey maxim.)

So I sought to understand, but couldn’t figure it out. Fortunately, Mike Rankin came to the rescue and suggested I look at the Hyphenation pop-up menu in the Dictionary pane of the Preferences dialog box:

hyphenation setting in preferences

I hadn’t used that feature for so long that I had completely forgotten that there was an option here: Hunspell, Proximity, and User Dictionary Only. (This came up in the comments on this post from a couple years ago.)

The Hunspell hyphenation setting seems to be pretty good most of the time, but in this case it fails badly! When I set it to Proximity, it worked the way I expected on that hyphenated word:

Badbreak3

Wow! Just goes to show: a) it really helps to know all the little ins and outs of this program, and b) it’s so important to have a community of InDesign users to connect with when mysteries arise! Thanks, Mike!

David Blatner
David Blatner is the co-founder of the Creative Publishing Network, InDesign Magazine, and the author or co-author of 15 books, including Real World InDesign. His InDesign videos at Lynda.com are among the most watched InDesign training in the world. You can find more about David at 63p.com.
David Blatner

Latest posts by David Blatner (see all)

Related Articles
Comments

0 Comments on “When a Hyphenated Word Won’t Break at the End of a Line

  1. But using this method you change dictionary for all paragraphs in document right? – so its not good solution imho. Why didnt you try to use discretionary hyphen/line break or something similar.

    • Do you find that Proximity is not a good hyphenation dictionary for you? In most cases, I think it does not make a big difference. Why do you think using other techniques would be better?

  2. I agree with Hoho,

    The best method to my mind is to create a “no-break” Character Style with “no-break” set to true and nothing else, apply it to “fitting” and “room”, then add a discretionary line break after the hyphen.

    The reason for this is that if you replaced the hyphen by a discretionary hyphen, it would disappear if the text were shifted, which would not be correct, and if you didn’t apply the Character Style to the compound words, they could still be hyphenated in the wrong place (English words are quite short, but it happens all the time with French words for example).

    Sadly, you can’t simply apply the Character Style to the whole word, because the discretionary line break seems to be overridden by the no-break rule, and it isn’t something that you can automate with a GREP Style either because GREP Styles don’t allow you to modify the content and add a new character (it’s a feature I think is really missing). But I guess you can write a little script to do it.

  3. I haven’t actually tried switching the dictionaries, but I have done this with a GREP style before. Something like ((\w+)(?=-))|((?<=-)(\w+)) seems to work pretty well, though you might need to test it out a little to see if it works in all cases.

    • Daniel: I’m not sure how that would help. Wouldn’t that give you 2 hyphens at the end of the line? (Or one hyphen at the end of a line and one at the beginning of the next line?)

  4. I- The fact that this is a document-level change is an issue because it can have repercussions on other parts of the document that the client had previously validated. It’s a deal-breaker for me because at best it doesn’t make you save time and it can even be dangerous.

    II- Changing dictionary doesn’t *solve* the problem of having words “randomly” hyphenated the wrong way: it is like choosing another seed of randomness (provided that Proximity is not far better than Hunspell but I will address that later).

    III- It is not perennial: 1- it doesn’t prevent other wrong hyphenations from appearing elsewhere if the text reflows, 2- the dictionary can be updated and behave differently in the future.

    IV- You are making a change in the document that is completely invisible and impossible for another person, or for yourself (you already admitted you had forgotten this feature once), to track. The repercussions are indeed very limited, but they exist. For instance: if you copy and paste a text frame to another document with the default hyphenation dictionary, your preference will be lost and you may not even realise it.

    V- Proximity was the default dictionary years ago, and is not any more. What if Hunspell were better ? I can see that it is open source, which has proven to be an advantage over private solutions when it comes to localisation because there is an international community maintaining it.

  5. As Geoffrey wrote, Hunspell allows more rapid localisation, but Proximity seems superior in this instance because it honours the typographic rule. I use Hunspell dictionaries and handle such instances case by case, applying No Break as necessary during final layout. I notice that apparently one can use Hunspell for spelling and Proximity for hyphenation though I’ve never tried to do so. Perhaps when deadlines are less pressing.

  6. I set long books day after day and my way of dealing with this is to do a find/change at the very start of a project that looks like this: Find what: – (hyphen) Replace with: -^- (hyphen plus non-breaking space). That way any hyphenated word will ONLY break at the hyphen. And if some of the words are in the middle of a paragraph, it doesn’t matter because the non=breaking space character doesn’t actually create any space or change what the text string visually looks .

  7. I only use InDesign if I’m made to do so, but if it operates like Quark, I bet if you put a discretionary hyphen in front of fitting-room (to turn hyphenation off for the word), it will break at the real hyphen like you want it to. Of course this requires looking and some localized effort instead of relying on the computer to make a universal change that could cause other exceptional things to happen that will require even more looking and fixing.

Leave a Reply

Your email address will not be published. Required fields are marked *