Highlighted

GREP change spaces to non-breaking one between digits

Community Beginner ,
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 🙂

Most Valuable Participant
Correct answer by Jongware | Most Valuable Participant

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.

TOPICS
How to

Views

105

Likes

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

GREP change spaces to non-breaking one between digits

Community Beginner ,
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 🙂

Most Valuable Participant
Correct answer by Jongware | Most Valuable Participant

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.

TOPICS
How to

Views

106

Likes

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
Sep 04, 2020 0
Adobe Community Professional ,
Sep 04, 2020

Copy link to clipboard

Copied

one solution could be

Schermata 2020-09-04 alle 10.35.10.png

Likes

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
Reply
Loading...
Sep 04, 2020 0
Adobe Community Professional ,
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.

Likes

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
Reply
Loading...
Sep 04, 2020 0
Adobe Community Professional ,
Sep 04, 2020

Copy link to clipboard

Copied

???

Your post is very awkward

If you want to help other users just do it

Regards

Likes

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
Reply
Loading...
Sep 04, 2020 0
Advocate ,
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!]

Likes

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
Reply
Loading...
Sep 04, 2020 1
Adobe Community Professional ,
Sep 04, 2020

Copy link to clipboard

Copied

😉

Likes

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
Reply
Loading...
Sep 04, 2020 0
Adobe Community Professional ,
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

Likes

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
Reply
Loading...
Sep 04, 2020 0
Community Beginner ,
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.

Likes

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
Reply
Loading...
Sep 04, 2020 0
Most Valuable Participant ,
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.

Likes

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
Reply
Loading...
Sep 04, 2020 2
Adobe Community Professional ,
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

Likes

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
Reply
Loading...
Sep 04, 2020 0
Community Beginner ,
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.

Likes

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
Reply
Loading...
Sep 04, 2020 0
Adobe Community Professional ,
Sep 04, 2020

Copy link to clipboard

Copied

In this case take a look the post of Jongware

Likes

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
Reply
Loading...
Sep 04, 2020 1