[Solved] Search carriage return and replace with tab

Discuss the word processor

[Solved] Search carriage return and replace with tab

Postby Lucian0 » Tue Jun 04, 2019 3:33 pm

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
Lucian0
 
Posts: 3
Joined: Tue Jun 04, 2019 3:28 pm

Re: Search carriage return and replace with tab

Postby RoryOF » Tue Jun 04, 2019 5:26 pm

Apache OpenOffice 4.1.7 on Xubuntu 18.04.3 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 29759
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Search carriage return and replace with tab

Postby FJCC » Tue Jun 04, 2019 5:33 pm

You should be able to do this by searching for any character at the beginning of a paragraph
Code: Select all   Expand viewCollapse view
^.

and replacing it with a tab followed by whatever was found in the search
Code: Select all   Expand viewCollapse view
\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.
Windows 10 and Linux Mint, since 2017
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
FJCC
Moderator
 
Posts: 7354
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Search carriage return and replace with tab

Postby Lucian0 » Tue Jun 04, 2019 5:43 pm

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
Lucian0
 
Posts: 3
Joined: Tue Jun 04, 2019 3:28 pm

Re: Search carriage return and replace with tab

Postby RoryOF » Tue Jun 04, 2019 5:47 pm

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.7 on Xubuntu 18.04.3 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 29759
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

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

Postby Lucian0 » Wed Jun 05, 2019 12:17 pm

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
Lucian0
 
Posts: 3
Joined: Tue Jun 04, 2019 3:28 pm


Return to Writer

Who is online

Users browsing this forum: MSN [Bot] and 13 guests