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

Small words on end of lines in paragraphs

Enthusiast ,
Jul 06, 2017 Jul 06, 2017

Copy link to clipboard

Copied

I've recently had a job where in paragraphs I was asked to around to the next line any one, two or three letter words so these words weren't looking like they were out on their own (even if they fell shorter than any line above or below). Never have I been asked to do this before, and I mentioned this to a friend, and he said you can set this in a style sheet or paragraph setting.

Does anybody know anything about this? If so, could you enlighten me please?

BTW: I know you can set a minimum of how many letters fall at the end of a line when using hyphenation by not breaking words under a user defined amount, but I wasn't allowed to use hyphenation.

Thanks.

Mat

Views

6.8K

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
Community Expert ,
Jul 06, 2017 Jul 06, 2017

Copy link to clipboard

Copied

Try check-marking Balance Ragged Lines under Indents and Spacing.

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 ,
Jul 06, 2017 Jul 06, 2017

Copy link to clipboard

Copied

It should work, but not necessary save you from all cases of short 'hanging' words.

Another possible approach: GREP that searches for whitespace preceded by a 1 or 2 or 3 letter words. Then apply a „No-Break” to the whitespace.

\b.{1,3}\b\K\s

You should create NoBreak Char style and implement GREP style in your para style.

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
Enthusiast ,
Jul 09, 2017 Jul 09, 2017

Copy link to clipboard

Copied

I have a GREP expression I use in paragraph styles...where I apply a "no break" character style to a certain number of characters at the end of a paragraph. To make sure the last 12 characters, for example, don't break, I use .{12}$.

I have a YouTube video explaining it in detail here: How To Eliminate Text Orphans and Widows (Runts)! - YouTube

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
Enthusiast ,
Jul 13, 2017 Jul 13, 2017

Copy link to clipboard

Copied

Is there a GREP command that applies to the end of each and every line rather than the end of each paragraph?. That would work.

Currently I have tried things like:

(\s.{1,3}\s)

...but this creates ugly paragraph shapes because you could have a run of one to three character words and they all have the no break style applied. E.g.: 'Is it fun to go ski if you can do it but do not like the cold?' This line doesn't break at all because there are too many one, two and three letter words that are having no breaks applied.

From what I can tell, there doesn't seem to be a GREP command that looks at the end of each line. Am I right? Please do tell me I'm wrong if you know otherwise, but at the same time as you are telling me I'm wrong, I'd really appreciate you telling me what the command is!

Thanks for your advice so far.

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
Enthusiast ,
Jul 13, 2017 Jul 13, 2017

Copy link to clipboard

Copied

There isn't (as far as I know) a command to tell it end of each line. However, using the $ expression will not only grab end of paragraphs, but also the end of a line where the soft return (shift-return) was used. But it doesn't catch line ending that were generated by ID's paragraph composer. What are you trying to accomplish? Better word spacing per line? Is the Adobe Paragraph Composer checked in your Paragraph panel menu? Also, how are the hyphenation settings?

If you do forced line breaks (soft returns), the above GREP expression should still work.

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
Enthusiast ,
Jul 22, 2017 Jul 22, 2017

Copy link to clipboard

Copied

All I was trying to prevent is small words ending up at the end of each line which overcomes the client asking for those words to be taken around and for me to have to do it before I send to the client. I'd never been asked to do this as a matter of course in 30 years of working as a designer. OK, the odd short word that looked ugly because it's hanging out past lines above and below gets taken around, but not every single word that is short and fits nicely within the paragraph shape!

Obviously, doing so many soft returns creates more work when you have to edit a line of text and it falls short of or longer than it's original length, meaning I have to undo and reapply soft line breaks... and having to do it across a 60 page magazine was a little tiresome and easy to miss the odd one or two per page. So, when the client asked me to reduce my invoice for the reason of having to point out taking round short words, I was a bit taken aback, especially when they also claimed I had made ugly paragraph shapes and wanted that taken into account for invoice reduction! Ironically it was the taking around of these words that created the ugly paragraph shapes!!

The trouble with taking short words around is it creates rivers down the lefthand side of the paragraph and indeed the column, so you can't win anyway! Better word spacing wasn't an issue really because text aligned left, and hyphenation isn't allowed. I really don't know what their beef is with small words at the end of lines as long as the paragraph shape is aesthetically pleasing and fits with the design... but then, design is so subjective and everybody is a designer nowadays, aren't they 😉

Thanks for all your advice anyway. Next time I'll use a combination of \b(a|an|the)\b\K\s and .{13}$, but the more I tested what I was, asking the more I was convinced it's not possible and the client is just very particular in their wants.

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
Community Beginner ,
Jul 28, 2020 Jul 28, 2020

Copy link to clipboard

Copied

Not to rehash an old thread, but I've been searching for just what the OP was originally looking for. 

 

What I need to look for is any 1-, 2- and 3-letter words that start a sentence. In other words, short words that follow a period and a space. Once we have that, we can apply a non-breaking style to that word and the space following it.

 

Screen Shot 2020-07-28 at 10.45.24 PM.pngFor example, if I can apply a no-break style to the "We" and the space following in the image here, it will break to the next line and not hang out over. 

 

I usually manually correct these by looking for this words along the rag and adding a non-breaking space after the 1–3 letter word, which usually forces it to the next line. 

 

I guess the key is looking for word after a period and space, and applying no-break.  I can't think of an issue in applying a non-break within a line, but it would fix the issue of these instance at the end of lines. 

 

The GREP I came up with was: 

\.\s+.{1,3}.

 

Anyone know how to do this better?

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 ,
Jul 13, 2017 Jul 13, 2017

Copy link to clipboard

Copied

Well, that was your original request: to around to the next line any one, two or three letter words.

Regex \b.{1,3}\b\K\s does exactly that.

I second Erica: there's no regex for the "last character in a line". And I'm not able to see how it could help you if it were.

Regarding your sample sentence: it only means that formal letter counting won't work for you. Well, create your own list of the words you don't want to see at the end of a line then.

Here's the one "no lines ending with indefinite or definite articles":

\b(a|an|the)\b\K\s

Feel free to expand the list until you and your client will be satisfied with the result.

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 ,
Oct 11, 2023 Oct 11, 2023

Copy link to clipboard

Copied

LATEST

Thank you! This tip was INCREDIBLY helpful! Ended up using your tip to create a rather long list of all the 1&2-letter words we didn't want at the end of each line. Turns out it was case-sensitive, so here's what we are using (including some punctuation):
\b(A|a|An|an|As|as|Ay|at|Be|be|Do|do|I|If|if|I'm|In|in|It|it|Of|of|On|on|on,|So|So,|so|To|to|We|we)\b\K\s

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