Skip to main content
Participant
January 13, 2017
Answered

Bad Word Breaks - and no hyphen

  • January 13, 2017
  • 1 reply
  • 2138 views

I am working on a very large foreign language document (Blackfeet) and need to type the word, "ómahkítaissksinima’tstohkio’pistsi." With other preceding words on the line, there is not enough room so InDesign has left the first four letters on the line and moved the rest to the line below (no hyphen...auto hyphenation is turned off). This is one word, with no discretionary breaking points added. There is plenty of room on the next line for the entire word. I know that I can highlight the word and select "No Break" which works fine.

The problem is that this is a 523 page document. There may be other long words which InDesign has arbitrarily split apart like this. Is there any way to search for these words (with grep?) without manually looking at every line? Thanks.

    This topic has been closed for replies.
    Correct answer winterm

    Hi winterm,

    This worked much better. Yes I used Find/Change.

    However, as I was working through the document, I discovered words as short as 11 characters had also been arbitrarily broken (this is a serious flaw in InDesign!) -- one, after I added no break, actually fit on the line and did not need to be broken at all. So I did it all again with:

    \w+[^\h\r]{10,}+

    As I was working through that I realized that I could do a Find/Change by using:

    \w+[^\h\r]{1,}+ and adding "+bold" (all the Blackfoot words are bold) and changing to "+ no break".

    That fixed the entire document all at once.

    Thanks much for your help.


    Hm, now I guess I didn't really dig in what you're after...

    So you have some special words that are formatted in bold now, and there's no other bolds in text? You want nobreak applied to those words no matter how long they are?

    No need to bother with grep find/change at all.

    What I would do:

    1. Find and select any properly formatted Blackfoot word (with bold and nobreak already applied, and whatever else it needs).

    2. Keeping it selected click Create new style icon at the bottom of Character Styles panel, give a meaningful name to a new style that appears in the list. Let's say, Blackfoot.

    3. Deselect text. Or click in / select target story - it depends what search scope you're going to define.

    4. Open Find/Change panel. Leave Find and Change fields blank. Find Format: + Bold, Change Format: Character Style: Blackfoot.

    5. Run it, and you're done (and this is the last time you'll need F/C panel for Blackfoot words ).

    6. Now you can easily manage appearance of all your Blackfoot words via special ChStyle edits, at any time.

    1 reply

    winterm
    Legend
    January 13, 2017

    This should find words longer than 25 characters:

    \w+[^\h]{25,}+

    Not thoroughly tested, so watch your step...

    Participant
    January 13, 2017

    Hey winterm. This search also seems to include the carriage-return character, and so shows the last word of a paragraph, the period, plus the first word of the next paragraph, if they are longer than 25 characters, which in this case generally is.

    Because the word is never the first word of a paragraph, is there any way to exclude that (or the carriage return)?

    winterm
    Legend
    January 13, 2017

    hi peter.

    You tried Find/Change, I guess?

    Imo, better approach is include this regex as a part of ParaStyle definition, then it works as expected:

    Pros: you can easily manage it at any stage of your work (edit, temporarily disable, etc.).

    If you still want to use F/C dialog, just add carriage return to exclusion:

    \w+[^\h\r]{25,}+