3

I'm using Libreoffice in Ubuntu 14.04 with unity.

What I have is a libreoffice writer file which looks like, say

The
quick

brown fox

jumps
over the lazy

dog

I would like to convert it into single paragraph, so that it looks like

The quick brown fox jumps over the lazy dog

How would I do this, with minimum efforts?

2

With Regular Expressions search enabled, search for $ and replace with a space. You may do another search/replace to reduce multiple spaces to one space.

Alternatively, you may first remove all empty paragraphs using a regex search for ^$, replacing it with "nothing" (empty string), and afterwards replace the paragraph marks by spaces as described.

enter image description here

Take care that this search/replace may affect the entire document - if you want to preserve some paragraph marks, you should first select the text to edit and restrict the search/replace to "current selection only" (option just above the regex option).

See also the OpenOffice documentation on search/replace using regular expressions - those explanations and advices often apply to LibreOffice, too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.