Page 1 of 1

[Solved] Search carriage return and replace with tab

Posted: Tue Jun 04, 2019 3:33 pm
by Lucian0
Hi there

Sorry if this has been answered, but I haven't seen it if so. I have seen some find/replace topics but I'm specifically looking to insert a tab at the beginning of each paragraph in my text. I haven't found that here.

So the idea would be to find every occurrence of a carriage return and replace it with a carriage return followed by a tab. I've been able to find carriage returns using $ with 'regular expressions' turned on in 'more options' in the search box. I put in the 'replace with box' this: $\t

All that happens is the carriage return gets replaced with $\t

I hope that's clear, apologies if not.

Thanks

best

Lucian0

Re: Search carriage return and replace with tab

Posted: Tue Jun 04, 2019 5:26 pm
by RoryOF

Re: Search carriage return and replace with tab

Posted: Tue Jun 04, 2019 5:33 pm
by FJCC
You should be able to do this by searching for any character at the beginning of a paragraph

Code: Select all

^.
and replacing it with a tab followed by whatever was found in the search

Code: Select all

\t&
If your purpose is to indent the first line of paragraphs throughout your document, it would be better to do that by modifying the paragraph style. Just ask if you do not know how to do that.

Re: Search carriage return and replace with tab

Posted: Tue Jun 04, 2019 5:43 pm
by Lucian0
FJCC wrote: If your purpose is to indent the first line of paragraphs throughout your document, it would be better to do that by modifying the paragraph style. Just ask if you do not know how to do that.
Thanks – seems to work. I haven't tried a replace-all yet, but a couple of samples seem to work.

On indenting – I'm preparing a document for printing. What I've found using Microsoft Word is that if you indent by modifying the paragraph style, this gets stripped out when the typesetter flows the text into the design program. That's why I need to insert tab characters, which are preserved at the typesetting stage of book production.

Many Thanks

L

Re: Search carriage return and replace with tab

Posted: Tue Jun 04, 2019 5:47 pm
by RoryOF
As a counsel of perfection, for correct book setting, Tabs are too long for a paragraph first line indent. Normally that would be a space the width of the line height, or at perhaps a 12 pt (em) space.

Re: [Solved] Search carriage return and replace with tab

Posted: Wed Jun 05, 2019 12:17 pm
by Lucian0
It's probably something like that. The typesetter deals with that, but they've requested an actual tab character inserted at the start of paras and then I think they alter that as they need to. They say they can't do it with indents. Thanks for your help.

best

L