RE: [libreoffice-users] Re: deleting hard returns
Hi to all, I use ^p to designate paragraph returns in LO and I think it works in MS Word as well. I have a need to remove blank lines (empty paragraphs) from time to time. I search for ^p^p and replace with ^p (the ^ (caret) is above the 6 ). I'm not sure what a 'soft return' is, but to take out the hard return and just let the text flow, I search for ^p and replace with ' ' (one blank) assuming there was no blanks after the . before the hard return. If you need to take out tabs ^t will work. Bob Bob Houston eBook Formattinghttp://about.me/BobHouston http://facebook.com/eBookFormatting Date: Mon, 28 Nov 2011 05:47:41 -0800 From: pedl...@gmail.com To: users@global.libreoffice.org Subject: [libreoffice-users] Re: deleting hard returns Hi Tom and e-letter I think you both missed step number 2 in Miroslaw's answer 2. In More options check Regular expressions. Although this is not quite user friendly, it works perfectly and it is good to know that LO has this feature. I'm keeping this one on my personal Tips and Tricks list ;) Thank you, Miroslaw! -- View this message in context: http://nabble.documentfoundation.org/deleting-hard-returns-tp3541244p3542232.html Sent from the Users mailing list archive at Nabble.com. -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: deleting hard returns
I'd suggest that, before giving advice, people actually try what they are suggesting. In OOo and LO, unlike MSO, paragraphs are designated by surrounding the text with p/p symbols (like html). As a result, there is no paragraph mark to search for, and using either ^p or \n in the search field will give you a search key not found error. On the other hand, if you ended a line with a Shift-enter, no new paragraph is created. Instead, a \n symbol is inserted into the text. If you enable regular expressions and put a \n in the find field, the \n will be found and can be replaced by anything you like (including nothing). There is no way I've ever found in OOo or LO to use ^p in the search field. ^p works in every version of MSO I've tried, but not in LO. I verified what I'm saying by actually trying it in LO 3.4.3 jomali On Mon, Nov 28, 2011 at 9:55 AM, Bob Houston bob_hous...@hotmail.comwrote: Hi to all, I use ^p to designate paragraph returns in LO and I think it works in MS Word as well. I have a need to remove blank lines (empty paragraphs) from time to time. I search for ^p^p and replace with ^p (the ^ (caret) is above the 6 ). I'm not sure what a 'soft return' is, but to take out the hard return and just let the text flow, I search for ^p and replace with ' ' (one blank) assuming there was no blanks after the . before the hard return. If you need to take out tabs ^t will work. Bob Bob Houston eBook Formattinghttp://about.me/BobHouston http://facebook.com/eBookFormatting Date: Mon, 28 Nov 2011 05:47:41 -0800 From: pedl...@gmail.com To: users@global.libreoffice.org Subject: [libreoffice-users] Re: deleting hard returns Hi Tom and e-letter I think you both missed step number 2 in Miroslaw's answer 2. In More options check Regular expressions. Although this is not quite user friendly, it works perfectly and it is good to know that LO has this feature. I'm keeping this one on my personal Tips and Tricks list ;) Thank you, Miroslaw! -- View this message in context: http://nabble.documentfoundation.org/deleting-hard-returns-tp3541244p3542232.html Sent from the Users mailing list archive at Nabble.com. -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
RE: [libreoffice-users] Re: deleting hard returns
Jomali, I stand corrected. And thank you. I receive the documents I work on in MSO '97, work on them in LO, and return as MSO '97 or HTML. Sometimes, at my age, it's hard to remember where I'm at, let alone what editor I'm using. Could also be why the last manuscript I worked on went back to the author with some blank lines still in it. |:( I'll put this out, to add to the discussion. I have found that when editing text documents (I use Notepad++) in the extended search mode, \r\n\r\n will find back to back hard returns (CRLF). And I just did test it again. |:) Bob Bob Houston eBook Formattinghttp://about.me/BobHouston http://facebook.com/eBookFormatting Date: Mon, 28 Nov 2011 11:00:28 -0500 Subject: Re: [libreoffice-users] Re: deleting hard returns From: jomali3...@gmail.com To: users@global.libreoffice.org I'd suggest that, before giving advice, people actually try what they are suggesting. In OOo and LO, unlike MSO, paragraphs are designated by surrounding the text with p/p symbols (like html). As a result, there is no paragraph mark to search for, and using either ^p or \n in the search field will give you a search key not found error. On the other hand, if you ended a line with a Shift-enter, no new paragraph is created. Instead, a \n symbol is inserted into the text. If you enable regular expressions and put a \n in the find field, the \n will be found and can be replaced by anything you like (including nothing). There is no way I've ever found in OOo or LO to use ^p in the search field. ^p works in every version of MSO I've tried, but not in LO. I verified what I'm saying by actually trying it in LO 3.4.3 jomali On Mon, Nov 28, 2011 at 9:55 AM, Bob Houston bob_hous...@hotmail.comwrote: Hi to all, I use ^p to designate paragraph returns in LO and I think it works in MS Word as well. I have a need to remove blank lines (empty paragraphs) from time to time. I search for ^p^p and replace with ^p (the ^ (caret) is above the 6 ). I'm not sure what a 'soft return' is, but to take out the hard return and just let the text flow, I search for ^p and replace with ' ' (one blank) assuming there was no blanks after the . before the hard return. If you need to take out tabs ^t will work. Bob Bob Houston eBook Formattinghttp://about.me/BobHouston http://facebook.com/eBookFormatting Date: Mon, 28 Nov 2011 05:47:41 -0800 From: pedl...@gmail.com To: users@global.libreoffice.org Subject: [libreoffice-users] Re: deleting hard returns Hi Tom and e-letter I think you both missed step number 2 in Miroslaw's answer 2. In More options check Regular expressions. Although this is not quite user friendly, it works perfectly and it is good to know that LO has this feature. I'm keeping this one on my personal Tips and Tricks list ;) Thank you, Miroslaw! -- View this message in context: http://nabble.documentfoundation.org/deleting-hard-returns-tp3541244p3542232.html Sent from the Users mailing list archive at Nabble.com. -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: deleting hard returns
I know that ^p works in MS Word but it does not work in LO 3.4.3 with regular expression turned on or without. The help discusses removing the Line break that is entered with the Shift+Enter and replacing with a hard return as if the enter key was pressed but there is no discussion of which regular expression works to find the end of paragraph marker that may be at the end of each line of text copied from a webpage and pasted into a Writer document. Interesting question. John McAtee From: Bob Houston bob_hous...@hotmail.com To: Users Global.libreoffice.org users@global.libreoffice.org Sent: Monday, November 28, 2011 9:55 AM Subject: RE: [libreoffice-users] Re: deleting hard returns Hi to all, I use ^p to designate paragraph returns in LO and I think it works in MS Word as well. I have a need to remove blank lines (empty paragraphs) from time to time. I search for ^p^p and replace with ^p (the ^ (caret) is above the 6 ). I'm not sure what a 'soft return' is, but to take out the hard return and just let the text flow, I search for ^p and replace with ' ' (one blank) assuming there was no blanks after the . before the hard return. If you need to take out tabs ^t will work. Bob Bob Houston eBook Formattinghttp://about.me/BobHouston http://facebook.com/eBookFormatting Date: Mon, 28 Nov 2011 05:47:41 -0800 From: pedl...@gmail.com To: users@global.libreoffice.org Subject: [libreoffice-users] Re: deleting hard returns Hi Tom and e-letter I think you both missed step number 2 in Miroslaw's answer 2. In More options check Regular expressions. Although this is not quite user friendly, it works perfectly and it is good to know that LO has this feature. I'm keeping this one on my personal Tips and Tricks list ;) Thank you, Miroslaw! -- View this message in context: http://nabble.documentfoundation.org/deleting-hard-returns-tp3541244p3542232.html Sent from the Users mailing list archive at Nabble.com. -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: deleting hard returns
On 28/11/2011, Pedro pedl...@gmail.com wrote: Hi Tom and e-letter I think you both missed step number 2 in Miroslaw's answer The reason for this is that the option is always selected manually! :) 2. In More options check Regular expressions. Although this is not quite user friendly, it works perfectly and it is good to know that LO has this feature. Agreed, it would be good if LO saved the option chosen from the last time the dialogue window was opened (as occurs in a text editor). If this worthy of a bug notification? -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: deleting hard returns
On 28/11/2011 at 22:15, e-letter inp...@gmail.com wrote: Agreed, it would be good if LO saved the option chosen from the last time the dialogue window was opened (as occurs in a text editor). If this worthy of a bug notification? Maybe you mean some specific circumstances, but my Writer *does* remember regular expression checkbox state. If I checked it, it will be checked next time I open search and replace dialog. It will work even if I shut down LO in between! It does not remember search strings, though. I am using LO 3.4.3 from Debian testing repositories on amd64 machine. -- Best regards Mirosław Zalewski -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: deleting hard returns
On 28/11/2011 at 20:49, John McAtee jlm_connect...@yahoo.com wrote: but there is no discussion of which regular expression works to find the end of paragraph marker that may be at the end of each line of text copied from a webpage and pasted into a Writer document. Do you mean $ (dollar sign)? It is described in online help: http://help.libreoffice.org/Common/List_of_Regular_Expressions. -- Best regards Mirosław Zalewski -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
RE: [libreoffice-users] Re: deleting hard returns
If the regular-expression technique given in later replies works, that's terrific. If not, there is another way to make it happen by digging into the ODT (if that is the document you have). MINING THE ODT It is possible to remove all of the hard line breaks in an ODF text (Writer ODT) document. The main risk is loss of all paragraphing too. If the document is entirely formatted using hard line breaks, paragraphing by insertion of extra line breaks (blank lines) will also be lost. It takes some surgery on the document. 1. Use a Zip utility to open A WORKING COPY of the *.odt file. (Rename it *.odt.zip is one way to make this easy.) 2. Extract a copy of the file named content.xml. 3. In a text editor do a search and delete (replace by nothing) of all text:line-break/ strings in the content.xml file. (It is helpful if you have a text editor that is XML friendly and doesn't show the document as if it is all one line of text. But it should work anyhow so long as the text editor can handle a line that long [;). 4. Add the modified context.xml back into the Zip and close the Zip. 5. Rename back to *.odt if needed. 6. Open it in Writer and see if the paragraphs survived. If not, decide how badly you want to go through the document and add paragraph breaks using the ENTER key where the breaks are needed. ALTERNATIVES TO PLAYING IN THE ZIP Another way, still requiring a text editor (not Writer), is to work on a .txt file and bring the corrections back into Writer: If (6) is really ugly, and the document is simple enough, the ODT can be saved as text instead. Use a text editor to replace every consecutive *pair* of line endings with something absurd such as *nl*. Then use the text editor to replace all remaining line endings with a single space each. Then use the editor to replace each remaining *nl* (or what you used) with a line ending. Now bring the .txt file back into Writer and save it as an ODT real fast. There will still need to be cleanup. For example, if any words were hyphenated between lines, those will have to be repaired. Even if the document has images and other decorations that make this difficult, you might want to make a .txt version anyhow, and copy and paste from the cleaned up text back into the better-formatted, more-complete original. Without seeing the original problem document, it is difficult to suggest anything that might be even simpler. - Dennis -Original Message- From: Pedro [mailto:pedl...@gmail.com] Sent: Sunday, November 27, 2011 23:42 To: users@global.libreoffice.org Subject: [libreoffice-users] Re: deleting hard returns If your file contains plain text you can easily fix that with an advanced text editor like Notepad2-mod. However if the text is formatted it requires some LibreOffice function that I'm not aware of but would be interested to learn :) Anyone? -- View this message in context: http://nabble.documentfoundation.org/deleting-hard-returns-tp3541244p3541556.html Sent from the Users mailing list archive at Nabble.com. -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: deleting hard returns
Miroslaw The $ did what the original poster was asking for. The local and online help show the same thing. I just did not grasp that you could just search for the $ alone. John McAtee From: Mirosław Zalewski mini...@poczta.onet.pl To: users@global.libreoffice.org Sent: Monday, November 28, 2011 5:32 PM Subject: Re: [libreoffice-users] Re: deleting hard returns On 28/11/2011 at 20:49, John McAtee jlm_connect...@yahoo.com wrote: but there is no discussion of which regular expression works to find the end of paragraph marker that may be at the end of each line of text copied from a webpage and pasted into a Writer document. Do you mean $ (dollar sign)? It is described in online help: http://help.libreoffice.org/Common/List_of_Regular_Expressions. -- Best regards Mirosław Zalewski -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted