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

How NOT to split NAMES on a single line in InDesign?

Community Beginner ,
Aug 10, 2024 Aug 10, 2024

Copy link to clipboard

Copied

Hi everyone,

Does anyone know how to prevent InDesign from splitting names that are separated by commas at the end of a line? I’ve tried a few GREP expressions, but they haven’t been entirely effective. Any suggestions?

TOPICS
How to

Views

428

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

Guide , Aug 11, 2024 Aug 11, 2024

I don't say this Grep code that groups complete names will work in all situations! …

 

((\u\.?['\w-]*)\h?(\u\.\h?)*)+(?2)

 

Capture d’écran 2024-08-11 à 13.50.29.png

 

Best,

(^/)  The Jedi

Votes

Translate

Translate
Community Expert ,
Aug 10, 2024 Aug 10, 2024

Copy link to clipboard

Copied

Replace the spaces within names with nonbreaking spaces.

 

Or apply a no-break character style across each name.


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

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 ,
Aug 10, 2024 Aug 10, 2024

Copy link to clipboard

Copied

Hi James,

Thanks for your prompt response. I tried both options and once again it's not working. When I replaced the spaces with nonbreading spaces, suddenly the text disappeared. Any further support? 

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 Expert ,
Aug 11, 2024 Aug 11, 2024

Copy link to clipboard

Copied

Use the non-breaking spaces only between the parts of a single name, NOT between the names or anywhere else you want the text to break.

you can use the following GREP to get you most of the way there:

Find: (\u\l+)( )(\u\l+)(?!,)

Change: $1~S$3

This will work for most names, but will fail for those with lowercase prefix portions or that have a suffix such as Jr.

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 Expert ,
Aug 11, 2024 Aug 11, 2024

Copy link to clipboard

Copied

@Peter Spier

 

Shouldn't be:

 

Change: $1~S$3$4

 

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 Expert ,
Aug 11, 2024 Aug 11, 2024

Copy link to clipboard

Copied

Don't think so. That last is a negative look ahead. Expression works here as-is.

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 Expert ,
Aug 11, 2024 Aug 11, 2024

Copy link to clipboard

Copied

quote

Don't think so. That last is a negative look ahead. Expression works here as-is.


By @Peter Spier

 

Right sorry. 

 

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 Expert ,
Aug 11, 2024 Aug 11, 2024

Copy link to clipboard

Copied

No worries. I'm hardly a GREP guru.

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 Expert ,
Aug 11, 2024 Aug 11, 2024

Copy link to clipboard

Copied

Sorry if I wasn't more clear — as already noted, you replace ONLY the spaces you don't want to break with this method. It's fairly standard to create or process name lists with a hard or nonbreaking space within each name, so that they will not break no matter how or where they are used further in the project or process.

 

A hard space in every slot just makes a string the app can't process. 🙂


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

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 Expert ,
Aug 10, 2024 Aug 10, 2024

Copy link to clipboard

Copied

Create a character style with no language and apply it to names. 
i doubt that it is possible to apply names such a style automatically as names do not follow any regular rules. 
Applying this character style will also exclude them from any spell checks. 

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
Guide ,
Aug 11, 2024 Aug 11, 2024

Copy link to clipboard

Copied

I don't say this Grep code that groups complete names will work in all situations! …

 

((\u\.?['\w-]*)\h?(\u\.\h?)*)+(?2)

 

Capture d’écran 2024-08-11 à 13.50.29.png

 

Best,

(^/)  The Jedi

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 ,
Aug 11, 2024 Aug 11, 2024

Copy link to clipboard

Copied

LATEST

This GREP command seems to be working well for me so far.

Thank you!

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