Hello, folks,
I'm trying to reformat some text I've received through email. What I want to do is take out the blank lines between paragraphs, take out the line endings in the paragraphs so that they flow and then replace the blank lines.
According to the list of regular expressions in the help file '\n' denotes a line end and '^$' denotes a blank line. Well, yes I can find the blank lines with '^$' but there's no way I can find "line end" followed by "blank line", which is what I want to do.
Someone help me, please?
David
Reformatting Problem
Reformatting Problem
David O Smith
Freelance writer, yarnspinner & world builder.
Using Open Office 4.4.1 running under OS X 10.10.4.
Freelance writer, yarnspinner & world builder.
Using Open Office 4.4.1 running under OS X 10.10.4.
Re: Reformatting Problem
The "line end" followed by a "blank line" is most probably caused by the paragraph style definition in use. For that paragraph style use /Format /|Styles and Formatting, click on first icon from left, right click on the style in question and choose "modify" from the popup. Now select "Indents and Spacing" tab and change Spacing: Above paragraph and Spacing: Below paragraph settings to 0 (zero)
If you are going to use OpenOffice Writer regularly, you should read up on Styles and forget about direct formatting.
If you are going to use OpenOffice Writer regularly, you should read up on Styles and forget about direct formatting.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Re: Reformatting Problem
Switch on non-printing characters by View > Non-printing characters so you can see what is happening.
LO 6.4.4.2, Windows 10 Home 64 bit
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
Re: Reformatting Problem
As John_Ha says. If the line is blank, with no backwards P on it, then it originates from the style as I said above. If it has a backwards P on it, then it should be findable by your macro.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Re: Reformatting Problem
It is difficult, but not impossible, to remove End of Paragraph (backwards P or ¶) marks by Find and Replace, even with Regular Expressions. Search the forum for some ideas on how to do it or, perhaps quicker, delete them manually. There is a macro of several hundred lines which can remove most End of Paragraph marks - see the Macros and UNI API Forum.
I think the Alternative Search and Replace add-on can find and replace End of Paragraph marks as it uses direct language coding for the ¶ and not Regular Expressions.
If this solves the problem, please edit your original post title to [Solved].
I think the Alternative Search and Replace add-on can find and replace End of Paragraph marks as it uses direct language coding for the ¶ and not Regular Expressions.
If this solves the problem, please edit your original post title to [Solved].
LO 6.4.4.2, Windows 10 Home 64 bit
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.
Remember: Always save your Writer files as .odt files. - see here for the many reasons why.