Author Topic: find and replace hard cr LO SOLVED!  (Read 934 times)

Offline dougmack

  • Hero Member
  • *****
  • Posts: 981
find and replace hard cr LO SOLVED!
« on: April 21, 2012, 10:01:59 PM »
Have pasted in a typed-up email with hard carriage returns.  How do I get rid of them so as to be able to fully justify the text?
I seem to remember seeing some kind of character that you could use to indicate a hard CR, but I don't know what it was.
Please answer soon, I'm on a deadline!
Thank you!  --doug
« Last Edit: April 23, 2012, 06:12:20 PM by dougmack »
Blessed are the peacemakers...for they shall be shot at from both sides.  A. M. Greeley

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5335
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: find and replace hard cr LO
« Reply #1 on: April 21, 2012, 11:11:48 PM »
Have you tried running "dos2unix" on it. That may do the job that you need.  dos2unix is in the repository

dos2unix - Convert text files with DOS or Mac line endings to Unix line endings and vice versa.

usage: dos2unix filename




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline dougmack

  • Hero Member
  • *****
  • Posts: 981
Re: find and replace hard cr LO
« Reply #2 on: April 22, 2012, 12:12:28 AM »
Well, that sort of works, but only sort of.  It definitely does what it claims.  But LO, when set to full justify, spaces all the
words         in      the          last       line       of     a        paragraph         like          this       to        make         the        last         word         come          here   

This is driving me crazy!

--doug
Blessed are the peacemakers...for they shall be shot at from both sides.  A. M. Greeley

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5335
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: find and replace hard cr LO
« Reply #3 on: April 22, 2012, 12:52:35 AM »
Sorry it was just an idea.




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline ternor

  • Hero Member
  • *****
  • Posts: 1799
Re: find and replace hard cr LO
« Reply #4 on: April 22, 2012, 01:01:46 AM »
Look in Help under "regular expressions" or "list of regular expressions."  You may find an expression '\n' represents a line break.  How well search and replace works with regular expressions in LO I don't know.  Try searching the LO user list or the OO forum.

Offline old_guy

  • Hero Member
  • *****
  • Posts: 706
Re: find and replace hard cr LO
« Reply #5 on: April 22, 2012, 05:30:44 AM »
dougmack

In LO select View > Nonprinting Characters (Ctrl + F10). Then you should be able to delete those characters and then set it up to full justify.

Earl
Never too old to learn.

Offline aguila

  • Hero Member
  • *****
  • Posts: 1210
  • soaring high = no Windows here :-D
Re: find and replace hard cr LO
« Reply #6 on: April 22, 2012, 03:28:14 PM »
If it's a long document it's gonna take a looooong while.

I tried to find out how to do it in LO but to no avail.

However, writing a text in Kate and hitting the enter/return button at the end of the line, I could replace the line breaks selecting "regular expressions" and putting \n in the search box.

Not what you asked for, but maybe it helps anyway.
All that is is good. PCLinuxOS is.

Thinkpad X61 Tablet, Core2Duo 1.66 MHz, 4 GB Ram, Intel onboard Graphics, Plextor PX-256M3 256 GB SSD; Thinkpad R61i, Core2Duo 1.66 MHz, 2 GB Ram, Intel onboard graphics, 120 GB HDD

Offline dougmack

  • Hero Member
  • *****
  • Posts: 981
Re: find and replace hard cr LO
« Reply #7 on: April 22, 2012, 04:00:33 PM »
I haven't figured it out either.  Still looking.  I have a q into the Symphony forum, Sym being a close cousin (and much more polished!).
I looked up Kate--it's supposed to be part of kdebase, but I have all of kdebase installed (according to symanic) and I don't have Kate.

Thanx for looking.--doug
Blessed are the peacemakers...for they shall be shot at from both sides.  A. M. Greeley

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5335
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: find and replace hard cr LO
« Reply #8 on: April 22, 2012, 06:03:05 PM »
you would have to install the kdesdk4-kate package to get kate installed.




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline dougmack

  • Hero Member
  • *****
  • Posts: 981
Re: find and replace hard cr LO
« Reply #9 on: April 22, 2012, 06:19:13 PM »
Thanx, YouCanToo--I've done that.  Now to see what happens. . . .

--doug
Blessed are the peacemakers...for they shall be shot at from both sides.  A. M. Greeley

Offline dougmack

  • Hero Member
  • *****
  • Posts: 981
Re: find and replace hard cr LO
« Reply #10 on: April 23, 2012, 06:11:42 PM »
OK, here's the answer.  It's clumsy, but it works.  Hi-lite the text in the email message, copy and paste it into Kate.  Hi-lite one paragraph at a time, being sure to stop just after the period--"full stop" to you Brits. You will wind up with a page of single endless lines.  Hi-lite the whole page and copy. Paste
into Symphony (or LO, if you hate IBM) and it will come out with each paragraph fitted between the margins, with no end-of-line information stuck to it.
Now Hi-lite the whole page, and select the full-justified icon and apply. 
Because going from Kate to Symphony stripped out the quote marks and made them square boxes, you'll have to go and fix all of them.  Before you
do, set the word processor to use custom quotes, so you get curly quotes instead of inch marks.  Now edit the whole body of text as you would have
done if it had come to you in this form in the first place.  Whew!

SOLVED.

Thanx for the various inputs.  Kate was the key.  I don't know why the other editing software couldn't do this, but maybe I'm just to stupid to
figure out how.  anyway, now I know (and you know) a way to do the job.

--doug
Blessed are the peacemakers...for they shall be shot at from both sides.  A. M. Greeley

Offline dougmack

  • Hero Member
  • *****
  • Posts: 981
Re: find and replace hard cr LO SOLVED!
« Reply #11 on: April 23, 2012, 06:20:29 PM »
Sorry, I left out one important thing.

'Hi-lite one paragraph at a time, being sure to stop just after the period--"full stop" to you Brits.'     HERE ADD:

Go to tools, and select  Join Lines.       THEN CONTINUE:

"You will wind up with a page of single endless lines. etc...."

--doug
Blessed are the peacemakers...for they shall be shot at from both sides.  A. M. Greeley

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5335
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: find and replace hard cr LO SOLVED!
« Reply #12 on: April 28, 2012, 12:48:57 AM »
How about writing up a "howto" about this and putting it in the Knowledge Base  http://pclinuxoshelp.com




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline dougmack

  • Hero Member
  • *****
  • Posts: 981
Re: find and replace hard cr LO SOLVED!
« Reply #13 on: April 28, 2012, 01:40:08 AM »
I'd be glad to.  I have sent YouCanToo a message with all the information I think is needed to set up an account to contribute.
--doug
Blessed are the peacemakers...for they shall be shot at from both sides.  A. M. Greeley

Offline aguila

  • Hero Member
  • *****
  • Posts: 1210
  • soaring high = no Windows here :-D
Re: find and replace hard cr LO SOLVED!
« Reply #14 on: April 28, 2012, 04:50:06 AM »
Really cool that you got it working.
 8)
Glad I could be of some help. :)
All that is is good. PCLinuxOS is.

Thinkpad X61 Tablet, Core2Duo 1.66 MHz, 4 GB Ram, Intel onboard Graphics, Plextor PX-256M3 256 GB SSD; Thinkpad R61i, Core2Duo 1.66 MHz, 2 GB Ram, Intel onboard graphics, 120 GB HDD