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

Need GREP for first word in a sentence to not be just ONE word

Community Beginner ,
Sep 01, 2023 Sep 01, 2023

Isis5C26_0-1693585470090.png

I need a GREP where I can fix the highlighted area. I dont want to start a new sentence with just one word. 

 

Any help?

TOPICS
How to , Type
430
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 , Sep 01, 2023 Sep 01, 2023

This can be modified to apply only to words of x character length or shorter...

for example, (\.\h\w{1,4})\K\h would limit it to words up to 4 characters.

Translate
Community Expert ,
Sep 01, 2023 Sep 01, 2023

In my experience, this is not directly possible. But have you...?

1. Made a paragraph style to control the text?

2. Set the word spacing, letter spacing, and glyph scaling? My favorite settings are 80/100/120 and -5%/0%/5% and 95/100/105.

3. Set the Hyphenation to 9/3/4/1/off/off/off?

4. Have you set kerning method to Optical? (I think it looks great, but not everyone agrees on this)
I find that when these general settings are setup well, I see less problems in the resulting text, leaving only a few things to possibly manually adjust.

One other thing you could try is GREP styles where you apply a nobreak character style to the space after a three-letter word. While this would passively apply it to many words, it would only matter when the 3-letter word is at the end of the line.

Mike Witherell
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 ,
Sep 01, 2023 Sep 01, 2023

Thank you.

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 ,
Sep 01, 2023 Sep 01, 2023

The following expression should find the space following the first word after a period, regardless of the length of that word:

(\.\h\w+)\K\h

Use the Change Formatting options to set No Break (best done as a character style) to the found space.

In the middle of a line it will have no visual effect, but it will eliminate all single words starting a sentence at the end of a line.

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 ,
Sep 01, 2023 Sep 01, 2023

This can be modified to apply only to words of x character length or shorter...

for example, (\.\h\w{1,4})\K\h would limit it to words up to 4 characters.

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 ,
Sep 01, 2023 Sep 01, 2023
LATEST

Thank you,

 

This worked.

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