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

remove space before paragraph break

Guru ,
Jan 05, 2018 Jan 05, 2018

Hi,

what is the find and replace way  to remove a space before a paragraph space?

Like when this happens:

Screen Shot 2018-01-05 at 10.49.27 AM.png

Thank you

5.7K
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 , Jan 05, 2018 Jan 05, 2018

Removing those spaces is one of the 10 different Find/Change greps done by the free script bundled with InDesign, Find/Change By List. (Window > Utilities > Scripts). Faster than a speeding bullet!

by Listf-scripts.png

Translate
Community Expert ,
Jan 05, 2018 Jan 05, 2018

In the Find field type a space and ^p. In the Change field just type ^p.

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 ,
Jan 05, 2018 Jan 05, 2018

There have been reports that replacing returns in the regular text Find/Change may mess with applied paragraph styles – the return gets "removed", pastring paragraphs temporarily together, and then it gets reinserted in the Change To.

Is that solved in recent InDesigns?

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 ,
Jan 08, 2018 Jan 08, 2018

https://forums.adobe.com/people/%5BJongware%5D  wrote

There have been reports that replacing returns in the regular text Find/Change may mess with applied paragraph styles – the return gets "removed", pastring paragraphs temporarily together, and then it gets reinserted in the Change To.

Is that solved in recent InDesigns?

Hi Jongware,

it's not resolved. Did a simple test with CC 2018.

Before find/change:

TextFindChange-1.png

Result:

TextFindChange-2.png

So it's better to do something like that with a GREP find/change using a positive lookahead.

Before:

GREPFindChange-1.png

After:

GREPFindChange-2.png

Regards,
Uwe

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 ,
Jan 08, 2018 Jan 08, 2018

Thanks for checking – yes, that is exactly what I meant!

I guess this is just something that cannot be fixed due to how "Find/Change" internally works.

(For those wondering why then that GREP solution is able to do it: it looks at but does not change the hard return, so the paragraphs never get stuck together. Of course the same solution could be transferred to the Plain Text Find/Change, but then it would also use GREP syntax. And we already have that option. Rule of thumb: the regular Find/Change is totally fine for all simple changes, but for more go to GREP.)

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 ,
Jan 08, 2018 Jan 08, 2018

FWIW:

My solution is only looking at one single instance of a blank character before the end of a end of paragraph character.

Not very flexible, but exactly the thing Jonathan was asking…

It could be better to expand that to a more universal pattern if you want to catch multiple whitespaces before the end of a paragraph character or the end of a story.

For all horizontal whitespaces:

\h+$

And replace with nothing.

Why do I not use:

\s+$

like Barb is suggesting in answer #2 ?

Because I do not want to get rid of any end of paragraph characters in this case.

Regards,
Uwe

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 ,
Jan 05, 2018 Jan 05, 2018

Or use the InDesign-provided GREP query—remove trailing whitespace. Preferable to me because it also picks up multiple spaces at the end, and extra ¶s.

\s+ (any white space, one or more)

$ (at the end of a paragraph)

Screenshot 2018-01-05 10.45.30.png

~Barb

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 ,
Jan 05, 2018 Jan 05, 2018

Removing those spaces is one of the 10 different Find/Change greps done by the free script bundled with InDesign, Find/Change By List. (Window > Utilities > Scripts). Faster than a speeding bullet!

by Listf-scripts.png

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
Guru ,
Jan 05, 2018 Jan 05, 2018

I believe i remember this one from you word to indesign workflow training in lynda.com.

I love your videos.

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 ,
Jan 08, 2018 Jan 08, 2018

Thank you!

Adobe fixed the FindChangeBuyList.txt file in CC2018, it no longer messes up paragraphs styles.

AM

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
Guru ,
Jan 08, 2018 Jan 08, 2018

ahh.. ok. thats great. you will be at Creative Pro correct?

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 ,
Jan 08, 2018 Jan 08, 2018

Do you mean the CreativeProWeek.com conference in June? Yes I will, it's my conference! 🙂 I hope you will be, too?

--AM

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
Guru ,
Jan 08, 2018 Jan 08, 2018
LATEST

Yes, I am attending.. looking forward to meeting some  the people who have given me so much training

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
Guru ,
Jan 05, 2018 Jan 05, 2018

is there a video tutorial that explains what each of those scripts is for? that name for it does not describe what it does.

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 ,
Jan 08, 2018 Jan 08, 2018

I rewrote the Find / Change by List so that it doesn't disturb paragraph styles:

Mike's Find/Change By List 2017

You can download it for free from my resources page.

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
Guru ,
Jan 08, 2018 Jan 08, 2018

got it!

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
Guru ,
Jan 08, 2018 Jan 08, 2018

just ran it on a 72 page document. nice!!!

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