This tutorial explains using the AutoCorrect feature of OpenOffice Writer to combine single-line paragraph fragments into paragraphs. Sometimes the text in a Writer document was originally created with short lines which form partial sentences. This typically happens when the text comes from an Optical Character Recognition application, or when it's copied from a PDF or from a website. Here is an example of text which needs to be combined. Reading the text we can see that there are two sentences. View → Nonprinting characters shows that the lines end in a ¶. That symbol indicates the end of a Writer paragraph. But these eight lines are not genuine paragraphs, just paragraph fragments.
If there is documentation about combining these with Autocorrect, I can't find it, so I've prepared this guide. Writer seems to understand that actual paragraphs end with a punctuation symbol: period, question mark, exclamation park, perhaps others. So single lines which don't end in punctuation are joined together by Autocorrect. This feature is designed for the paragraph structure of many languages; detailed editing for specific languages or special cases may be necessary and is your responsibility.
To join single-line paragraph fragments you will use AutoCorrect's Apply action:
- Set option [M] in Format → Autocorrect → Autocorrect Options → Options → Combine single line paragraphs. Use the Edit button to change the length setting. I suggest starting with if length greater than 0%.
- Ensure all other AutoCorrect [M] options are disabled. In Options, uncheck every box in the [M] column. This prevents the Apply action from making any AutoCorrect changes except single-line paragraph conversions. Also, in Localized Options, uncheck every box in the [M] column. Click OK. There is no need to change any of the [T] settings. I believe it is best to keep every [M] setting normally unchecked, only enable the one(s) you specifically want to use for the Apply action, then turn them all back off when done.
- Using the Format → Styles and Formatting dialog, set the style of the paragraphs (leftmost icon) which you want to convert to Default. Paragraphs which are set to a different style will not be converted. If you have opened a document which wasn't created by OpenOffice, say a plain text file or a simple document from an OCR application, all of your paragraphs will probably already have the Default style. You are more likely to have success with this feature if you specify the correct language for your text. Styles and Formatting → Paragraph Styles (leftmost icon) → Default → Right-click → Modify → Font → Western text font → Language.
- Select the lines which contain the paragraph fragments you want to convert, or select nothing to process every paragraph with the Default style. You can use Edit → Find & Replace to help locate specific text in your document if you don't want to perform single-line paragraph conversion on everything. The entire paragraph will be converted if any text in it is selected and it has the Default paragraph style. When you select any text, paragraphs without selected text are not converted. By converting only selected lines of text you can, for example, use different language settings for portions of your document.
- Use Format → AutoCorrect → Apply.
This tutorial only covers the Autocorrect method for combining single-line paragraphs. A search of the Writer forum for the terms OCR, remove paragraph breaks, or combine lines will locate topics discussing ways to do the conversion with Find & Replace, with extensions, or with macros. They could offer more control of the process at the expense of being more difficult to use.
Note that questions are not allowed in the Tutorials section of the forum. Ask them in the Applications → Writer section. If questions there lead to improvements to the tutorial, I will make them here.