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

GREP change spaces to non-breaking one between digits

Explorer ,
Sep 04, 2020 Sep 04, 2020

Copy link to clipboard

Copied

Hi all,

Trying to fix large numbers that are split on line breaks. I have a bunch (a lot, actually) numbers following the XX XXX patterns. I'd like to change the space between group numbers to a non-breaking one using GREP. Whatever I try doesn't seem to work. Can anyone help with this I guess it's trivial but that totally not my area of expertise 🙂

TOPICS
How to

Views

2.2K

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

Community Expert , Sep 04, 2020 Sep 04, 2020

This might be easier than introducing a mandatory search-and-replace : a GREP style.

 

Create a character style that applies only No Break, and add it to your Paragraph Style(s) using the GREP pattern

 

\d\s\d

 

... and you don't have to change anything else, all digits separated by a space will automatically be kept rogether.

Votes

Translate

Translate
Guide ,
Sep 04, 2020 Sep 04, 2020

Copy link to clipboard

Copied

one solution could be

Schermata 2020-09-04 alle 10.35.10.png

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 ,
Sep 04, 2020 Sep 04, 2020

Copy link to clipboard

Copied

Why don't you post the code in the forum?

Why a screenshot? 

That is very awkward.

 

What is going on with ACPs on this forum - I haven't been present for a while - but all I see is a lot of boasting about being able to do something and not much help from ACPs.

 

This makes it very unattractive for me to post here.

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 ,
Sep 04, 2020 Sep 04, 2020

Copy link to clipboard

Copied

???

Your post is very awkward

If you want to help other users just do it

Regards

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 ,
Sep 04, 2020 Sep 04, 2020

Copy link to clipboard

Copied

Aha! …

 

In the past, some were very often very angry against me because I posted lots of screenshots … in "French", that is my InDesign version language!

 

Vladan, you could use an "English" version if you don't post Grep codes!

 

[ This is a joke!  ðŸ˜‰  â€¦ and this time I totally disagree with Eugene!]

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 ,
Sep 04, 2020 Sep 04, 2020

Copy link to clipboard

Copied

😉

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 ,
Sep 04, 2020 Sep 04, 2020

Copy link to clipboard

Copied

for radekj and other users,

I think it's very useful that those who want to learn grep (and indesign) don't do just copy-paste without even knowing what to type and where to find the code.
I believe that at least searching the codes could be a first step to learn how to use grep and many other functions in Indesign.

Regards

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
Explorer ,
Sep 04, 2020 Sep 04, 2020

Copy link to clipboard

Copied

TBH I'd love to go through a decent GREP tutorial, especially focused on InDesign. Everything I found so far was mostly focused on programmers and was very tech-oriented.

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 ,
Sep 04, 2020 Sep 04, 2020

Copy link to clipboard

Copied

This might be easier than introducing a mandatory search-and-replace : a GREP style.

 

Create a character style that applies only No Break, and add it to your Paragraph Style(s) using the GREP pattern

 

\d\s\d

 

... and you don't have to change anything else, all digits separated by a space will automatically be kept rogether.

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 ,
Sep 04, 2020 Sep 04, 2020

Copy link to clipboard

Copied

Hi _Jongware,

if OP want to apply non-breaking only to the this number format XX XXX, as he has told, and for some reason in the same paragraph he has other different number format (X X or XX XXA or AX XXXB ecc) in that case the grep patern \d\s\d is not for him

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
Explorer ,
Sep 04, 2020 Sep 04, 2020

Copy link to clipboard

Copied

Hi Vladan,

It's basically about a space between any 2 digits - I want to make it a non-breaking one to keep the digits together in one line.

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 ,
Sep 04, 2020 Sep 04, 2020

Copy link to clipboard

Copied

LATEST

In this case take a look the post of Jongware

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