• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Bad Word Breaks - and no hyphen

New Here ,
Jan 13, 2017 Jan 13, 2017

Copy link to clipboard

Copied

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.

Views

1.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Mentor , Jan 18, 2017 Jan 18, 2017

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 p

...

Votes

Translate

Translate
Mentor ,
Jan 13, 2017 Jan 13, 2017

Copy link to clipboard

Copied

This should find words longer than 25 characters:

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

Not thoroughly tested, so watch your step...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 13, 2017 Jan 13, 2017

Copy link to clipboard

Copied

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)?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jan 13, 2017 Jan 13, 2017

Copy link to clipboard

Copied

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:

word25.png

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,}+

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 18, 2017 Jan 18, 2017

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jan 18, 2017 Jan 18, 2017

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 18, 2017 Jan 18, 2017

Copy link to clipboard

Copied

LATEST

Hi winterm,

Yes, that solution makes sense. Thanks again for your help!

Yes, I have some (~24,000) Blackfoot words that are formatted in bold and only the Blackfoot words are bold.

What I wanted was for InDesign to not break the Blackfoot words arbitrarily (and because auto-hyphen was turned off, it should not have). Applying "No Break" seemed to be the quick-fix solution. I also didn't want to mess up the pagination of the document, because an extensive index was generated based on the existing layout.

I wanted to be able to identify only the Blackfoot words that were broken into two, so that when I applied "No Break,"I could ensure that the pagination stayed the same. In the end, applying a "No Break" style to all the bold words turned out to be the easiest solution. Only about six pages got messed up which I was able to identify layer and repair/update the index.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines