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

How to prevent last word on page from breaking?

Community Beginner ,
Aug 22, 2018 Aug 22, 2018

Hi,

Is there any solution to automatically apply No Break only on last word on page?

2.4K
Translate
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

Community Expert , Aug 22, 2018 Aug 22, 2018

In the Hyphenation panel, you can uncheck (untick) Hyphenate Last Word and Hyphenate Across Column and make this part of your Paragraph style.

Across Column includes Across Page. Would this work for you?

IMG_5586.PNG

Translate
Enthusiast ,
Aug 22, 2018 Aug 22, 2018

No, you can't find the last word on a page...unless it is also the last word in a story each time. You might be able to script that, though...you might check the scripting forums.

Translate
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
Community Beginner ,
Aug 22, 2018 Aug 22, 2018

Thank You Erica, and what a coincidence, just watching You on youtube (GREP)

Suad

Sarajevo, Bosnia

Translate
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
Enthusiast ,
Aug 22, 2018 Aug 22, 2018

Sorry if you were trying to get away from me...I am everywhere...haha!

Translate
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
Guide ,
Aug 22, 2018 Aug 22, 2018

Hmm! …

Not really sure the problem is to know if "you can [or not] find the last word on a page… [blabla]"

… But can InDesign do it? … and I should add: "basically!".

Best,

Michel, for FRIdNGE

Translate
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
Community Beginner ,
Aug 22, 2018 Aug 22, 2018

Thank You All, I'm already using Hyphenate Last Word (OFF) and Character style with No Break combination but I was wondering is there some other way (automated) to do this.

Translate
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
Guide ,
Aug 22, 2018 Aug 22, 2018

To avoid word cuts between pages (or columns), uncheck "Hyphenate Across Column".

Best,

Michel

Translate
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
Community Expert ,
Aug 22, 2018 Aug 22, 2018

Your might be able to hire a scripter who can do it in "one click", but it's not a feature built into InDesign. (There is a good one following this thread.) Remember, though, that everytime you get an edit, the last word on the page is subject to change and the No Break needs to be changed as well.

GREP can find the Pilcrow (paragraph marker), so it's easy to find the last word of a paragraph. But there is not a marker at the end of the page.

You could also put it in as a feature request at User Voice:

Adobe InDesign Feedback

Translate
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
Guide ,
Aug 22, 2018 Aug 22, 2018

Sorry Jane! I don't understand what you mean now! …

The user just needs to correctly parameter the hyphenation settings of his para styles!

Uncheck "Hyphenate Across Column" avoids word cuts between pages!

Imho, when the ID developer indicated "Across Column", (s)he didn't simplistically think "columns inside a text frame"!

Knowing that a text frame apparently without columns (2, 3, 4 or more) has in fact by default "1" column, (s)he included, by using "Across Column", the meaning "Across 2 text frames" [= across 2 columns]! … So, 2 pages with 2 threaded text frames!

Best,

Michel

Translate
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
Community Expert ,
Aug 22, 2018 Aug 22, 2018

Applying "No Break" as character formatting with GREP for the last word on the page is what the OP asked for, Michel. That's the feature that isn't there.

What if (hypothetically), you have three columns and want the last word to break across columns 1-2 and 2-3 but not column 3 to the next page? Can that be done with a script? Only the last word on the page and not the first two columns?

Again, hypothetical.

Translate
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
Guide ,
Aug 23, 2018 Aug 23, 2018

Jane,

The question was:

"How to prevent last word on page from breaking?"

… that means:

How to prevent last word on page from breaking … "when this word runs across 2 pages"?

ID can avoid it as said!

… But [to answer to your second comment] ID does it "globally"! … For all the columns covered by the para!

Btw, this approach seems to me a reading "good" approach!

But [hypothecally and simplistically but precisely] to answer you if Javascript could skirt this setting, I'ld say yes of course with some code lines like these ones:

// From FRIdNGE [August 2018]

var myParas = app.activeDocument.stories.everyItem().paragraphs.everyItem().getElements(),

P = myParas.length,  p;

for ( p = 0; p < P; p++ ) {

    //if ( myParas

.insertionPoints[-1].textColumns[0] != myParas

.insertionPoints[0].textColumns[0] ) {

    if ( myParas

.insertionPoints[-1].parentTextFrames[0] != myParas

.insertionPoints[0].parentTextFrames[0] ) {

        myParas

.select();

        alert( "Gotcha! … ;-)" )

    }

}

Best,

Michel

Translate
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
Community Expert ,
Aug 23, 2018 Aug 23, 2018

Line 08, Michel?

Translate
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
Guide ,
Aug 23, 2018 Aug 23, 2018
LATEST

The lines 07-08 are just to indicate what paras are found by the script!

What it does with each of them [avoid hyphenation] is relatively accessory (sample)!

Best,

Michel

Translate
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
Community Expert ,
Aug 22, 2018 Aug 22, 2018

In the Hyphenation panel, you can uncheck (untick) Hyphenate Last Word and Hyphenate Across Column and make this part of your Paragraph style.

Across Column includes Across Page. Would this work for you?

IMG_5586.PNG

Translate
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
Enthusiast ,
Aug 22, 2018 Aug 22, 2018

I think that may actually solve their problem...I was so focused on the "use GREP to find the last word on a page" part that I didn't step back and think about what was really needed.

Translate
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
Guide ,
Aug 22, 2018 Aug 22, 2018

… And Jane is totally right of course! …

Best,

Michel

Translate
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