Widow/Orphan control

Started by DCurry, March 03, 2016, 11:21:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DCurry

I can never remember which is a widow and which is an orphan, but does anyone know a way to force InDesign to always keep at least 2 words on a line?

I looked under Keep Options, but that only applies to lines, not words. It can't be a manual fix, either, because I'm using SmartStream to generate variable data and some of the lines break ugly and leave me with 1 word on the last line, but I want at least 2. I can't use "no break" because it will force everything onto 1 line only.

I seem to remember Quark having control over this, but that wouldn't help me, anyway.
Prinect • Signa Station • XMPie

Build a man a fire, and he'll be warm for a night. But set a man on fire, and he'll be warm for the rest of his life!

Joe

Mac OS Sonoma 14.2.1 (c) | (retired)

The seven ages of man: spills, drills, thrills, bills, ills, pills and wills.

DCurry

No, that deals with lines (meaning lines of type). Thanks, though.

I did find a way to use GREP to apply a No Break Character Style to the last few characters of a paragraph. The downside to this is I have to guess and pick a random number that will work for most of the scenarios. I'd rather be able to assign it to the last 2 words, no matter what their length.

Prinect • Signa Station • XMPie

Build a man a fire, and he'll be warm for a night. But set a man on fire, and he'll be warm for the rest of his life!

Joe

Quote from: DCurry on March 03, 2016, 12:15:46 PMNo, that deals with lines (meaning lines of type). Thanks, though.

I did find a way to use GREP to apply a No Break Character Style to the last few characters of a paragraph. The downside to this is I have to guess and pick a random number that will work for most of the scenarios. I'd rather be able to assign it to the last 2 words, no matter what their length.

Hmmm...I'm not a GREP expert by any means but I'll bet there is a way to do that with GREP. Try this one.

http://tetragonpublishing.com/blog/2012/05/25/killing-runts-in-indesign-with-grep
Mac OS Sonoma 14.2.1 (c) | (retired)

The seven ages of man: spills, drills, thrills, bills, ills, pills and wills.

Tracy

found this, It's in paragraph styles-grep
never used grep
there is a movie at the bottom
you will prolly pickup grep pretty easy
let us know what you figure out!!!

https://forums.adobe.com/thread/1162060?tstart=0

DCurry

Tracy, that looks promising. I'll need to tinker with it to figure out how to make it see the last 2 words instead of just the last 1 word, but that puts me on the right track.

I may not get back to this til next week, but at least now I have some options.
Prinect • Signa Station • XMPie

Build a man a fire, and he'll be warm for a night. But set a man on fire, and he'll be warm for the rest of his life!

Tracy

yes, report back when you get something!

DCurry

I did have some more time to mess with this. I made a GREP style that keeps 3 words together and it seems like it is doing the trick.

(\s\w+\s\w+.?)$

So, between this option and the previous option where I control the number of characters that get a No Break:

.{n}$
(n=number of characters to keep together)

 I should be able to make something work. Thanks all for pointing me in the right direction. This shit is powerful! Too bad it's all so cryptic.
Prinect • Signa Station • XMPie

Build a man a fire, and he'll be warm for a night. But set a man on fire, and he'll be warm for the rest of his life!

Tracy

Thanks Dan, I'm going to attempt to learn it, I remember quark's, what was it? Edit H&J's? :laugh:

StudioMonkey

#9
A Widow is a single line of a paragraph at the BOTTOM of a column or page, an Orphan is a single line of a paragraph at the TOP of a column or page.

AFAIK you can't do it with a set number of words in InDesign.

Time flies like an arrow - fruit flies like a banana