[Solved] Search carriage return and replace with tab

Discuss the word processor
Locked
Lucian0
Posts: 3
Joined: Tue Jun 04, 2019 3:28 pm

[Solved] Search carriage return and replace with tab

Post 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
Last edited by Hagar Delest on Tue Jun 04, 2019 9:06 pm, edited 1 time in total.
Reason: tagged solved
OpenOffice 4.1.6 on MacOS 10.14.5
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Search carriage return and replace with tab

Post by RoryOF »

Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
FJCC
Moderator
Posts: 9248
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Search carriage return and replace with tab

Post 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.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Lucian0
Posts: 3
Joined: Tue Jun 04, 2019 3:28 pm

Re: Search carriage return and replace with tab

Post 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
OpenOffice 4.1.6 on MacOS 10.14.5
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Search carriage return and replace with tab

Post 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.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Lucian0
Posts: 3
Joined: Tue Jun 04, 2019 3:28 pm

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

Post 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
OpenOffice 4.1.6 on MacOS 10.14.5
Locked