Skip to main content
Inspiring
May 15, 2025 12:12 PM UTC
Answered

How to fix broken paras in indesign

Hi..

A client has given me a word document converted from epub to word, to be typeset in indesign. The word document is a complete mess and there are random carriage returns inbetween sentences. This is making the sentences break in the middle. Is there any quick fix for this using grep?

 

I'm able to find all the broken sentences using this find grep :  ^[a-z]. But to join them back I'm not sure what to put in the replace grep. So I'm having to manually delete the carriage return, add a space and join the sentence. Any help would be appreciated. Please find a picture attached. 

Mike Witherell
Mike WitherellCorrect answer
Community Expert
May 15, 2025 12:58 PM UTC

Find:

(?<=\l)\r

Change:

type a spacebar space

Mike Witherell

6 replies

Mike Witherell
Community Expert
Mike WitherellCommunity ExpertCorrect answer
Community Expert
May 15, 2025 12:58 PM UTC

Find:

(?<=\l)\r

Change:

type a spacebar space

Translate
Mike Witherell
Inspiring
May 15, 2025 1:13 PM UTC

Hi thank you..this works for the sentences when they're broken with upper case letters like proper names. so I'm using this to find those instances. Thank you so much!! Much much appreciated!

Translate
Inspiring
May 15, 2025 12:43 PM UTC

Hi i found the solution thank you! if anyone else needs it, this worked for me

Find: (\r)(?=(^[a-z]))

Change: Spacebar space

 

This chooses the carriage return before the break and changes that into a space!

Translate
Mike Witherell
Community Expert
Community Expert
May 15, 2025 12:25 PM UTC

Here is a GREP search which should find most of them:

Find:

(?<!\.)\r

Change:

a spacebar space

You might also limit this GREP search to a specific paragraph style, too.

Translate
Mike Witherell
Inspiring
May 15, 2025 12:35 PM UTC

Hi thank you for replying, but this doesn't work. This is choosing all paras after dialogues, exclamation marks etc.. I only need it to choose sentences broken without a period. Also, finidng the sentences is not a problem, how to connect them back is. Thank you!

Translate
Inspiring
May 15, 2025 12:38 PM UTC

^[a-z] this grep finds all sentences that start with a lowercase in the new para, so i know those are the broken sentences since this is a novel I'm working on. But only way to join it to the previous para seems to be to manually backspace the carriage return. Hope that clears my query a bit. Thanks!

Translate