Merging Paragraphs with Find/Change

Ginny wrote:

I’ve imported 40 pages of directory listings each with a hard return at the end of a line. Is there a way to globally change the hard returns to soft returns, or forced line breaks, once the text is imported from a word doc into InDesign?

The goal is to separate each member’s info with a space after attribute using the hard return, with the rest of each members info spaced with leading only.

This requires a tried-and-true technique: A triple Find/Change.

Lets take some sample text, as you described:

fc-textstart.gif

It’s easy to replace a return with a soft return in Find/Change, (Find: ^p, Change: ^n) but that’s usually going overboard. You end up with one monstrously long paragraph with no easy way to break them up into smaller ones.

So you start out by figuring out what unique thing — a text string, a character style, a certain number of returns — only appears immediately before or at the beginning of your “real” paragraphs and on no others. Then you use Find/Change to temporarily replace that unique identifier with something that doesn’t contain any return characters. I often use %%%.

For the sample above, the “real” paragraphs are identified by two returns in a row (pretty common). So we replace that identifier with a unique string.

fc-1.gif

fc-1text.gif

Now that the only returns in the text are ones that shouldn’t be there, you can safely replace them with what you want — in your case, a soft return (forced line break), but often people need to replace end-of-line returns with a space or a tab.

fc-2.gif

fc-2text.gif

The third and final Find/Change replaces the unique paragraph separator we added with an actual return character.

fc-3.gif

fc-3text.gif

So now you can easily select all the text and apply paragraph formatting, such as Space Before, that does what you want it to.

fc-textfinal.gif

Bookmark
Please login to bookmark Close

This article was last modified on December 18, 2021

Comments (20)

Leave a Reply

Your email address will not be published. Required fields are marked *

Loading comments...