How to replace paragraph break with double paragraph break?

Question

I need to replace paragraph breaks with double paragraph breaks, using the find and replace function as it is a long text.

It seems I can find paragraph breaks using “$”, but I cannot replace them using “$$”. Indeed, using “$” seems only to represents a paragraph break in the find slot, whereas in the replace slot, it represents the character itself.

Background context:
I have a long text which uses manual line-breaks (SHIFT + ENTER) instead as paragraph breaks (ENTER) by default. In sections which require a double paragraph break, a single paragraph break is used (with below paragraph spacing enabled). Unchanged, this will cause me many formatting issues, beginning with my inability to justify the text.

The solution I figured, is to:
a) Edit spacing of the paragraph style, so there is no space before/after paragraph.
b) Replace all paragraph breaks with double paragraph breaks.
c) Replace all manual line breaks with paragraph breaks. (By inserting “\n” in find and replace boxes, and selecting regular expressions box)

I am unable to complete this however, due to my inability to complete (b)

[EDIT: I mixed up before/after paragraph spacing with line spacing in OP, so edited accordingly.
My OS is Linux Mint, and LO version is 7.3.7.2]

Why would you do that? Empty paragraphs (resulting from your “double paragraph breaks”) are faulty because they contain no information and nearly always cause problems when you tune your formatting.

There is a second error in your workflow: line break instead of paragraph break. The basic semantic unit in Writer is a paragraph which can be individually styled (and consequently “decorated”). A line break does not leave the paragraph. Consequently, your document is physically made of huge paragraphs while logically you should have many small paragraphs.

I assume that your “double paragraphs” correspond to some transition in the argumentation. This means the first paragraph after the “transition” is special in some way. The “natural” handling method is to assign to these transitional paragraphs a dedicated style. In this dedicated style, you define a taller spacing above. On the contrary, if it is the paragraph above the transition which is “special”, give it a dedicated style and increase its spacing below.

In the end, my suggestion is to replace the line breaks by paragraph breaks and style your whole text. But, absolutely, don’t go for double paragraph breaks.

You already have discovered that line breaks cause perturbations on alignment. Empty paragraph breaks will cause issues on layout (in relation with page breaks or other vertical positioning).

PS: you didn’t mention OS name, LO version and, quite important here, save format.

If you do not agree to @ajlittoz’ good advice you can replace single paragraph breaks with double paragraph breaks this way:

  • copy two empty paragraphs into clipboard
  • FIND&REPLACE: Search all (entire document or selected text) $ (Regular Expressions)
  • leave FIND&REPLACE: the paragraph marks are still selected
  • paste (shortcut CTRL+V) clipboard - one paragraph mark is replaced by two ones

Bear in mind that this is a “non-professional” proceeding which can cause some other problems which were told in the above comment.


PS: Another way to replace one “pilcrow” by two can be done on the AltSearch.oxt extension. This extension is outdated but still useful for some special use. Last (recommended) version is 1.4.2.

1 Like

Thank you for the warning regarding double paragraphs.

I should mention before continuing, I made an error in original post (which I now changed). For (a) I meant editing the before/after paragraph spacing, not the line spacing. I also added OS and version to OP (Mint 7.3.7.2)

I am considering the alternative you suggested, of alternating styles to alternative between spacing’s. However, I do not wish to alternate between spacing’s because I have “special” paragraphs. I wish to alternate between (standard) paragraphs breaks, and scene/argument breaks. So all paragraphs are within a higher level scene/argument, which is like a middle point between chapters and paragraphs.

Let’s say I have style A (no above/below paragraph space) and style B (0.20cm above paragraph). I could use style A for every paragraph except for the first paragraph of every scene, for which I could use style B.

I think this would have the effect I’m looking for, but I do not know if it could cause further problems. As it’s my first time formatting a text (and a complex one at that), and it’s first time learning about styles, I want to do things right. Would you recommend what I have suggested, or is there a more efficient way?

(Edit: I ironically have tried to edit this response by increasing the paragraph spacing from 2 to 3, to make it easier to read. But it seems not to have changed anything)

You always benefit to “tag” your paragraph (and more generally any “object” like word) with a style to make a significance/meaning/importance distinction. In your scenario case, you probably have a scene heading. If you also want to collect these headings in a TOC, use Heading n with which you can build a hierarchy. The choice of spacing or appearance can be deferred to a later tuning stage where you’ll choose the most appropriate before/after spacing and combinations between styles.

Remember that appearance is secondary to semantic markup (styling). This may seem paradoxical but, as an author, you should strive to structure your text according to your own idea about it (what is the main argumentation? what is a comment? what is an ancillary description? …). It is then easy to give typographical attributes to these categories. What you should aim for is to separate contents from look.

If you do the inverse, i.e. focus on italic, bold, font face and size, spacing, … trying to converge on a satisfactory look is a very tedious process because you don’t know the limits of your action. You may affect unintended parts of the document. Usually this means reviewing manually every paragraph and perhaps interacting with contents.

Try to have an abstract view of your document. IMHO, for a scenario, ~5 paragraph styles would do the job. You probably need 5-10 character styles. The number of page styles is harder to evaluate because it highly depends on “tradition” rules of the industry (at leat once for cover First Page, perhaps one for front matter, 1 to 3 for contents – among which Default Page Style – depending on the type of header*footer.

And, of course, this applies only to .odt save format. Any other causes loss of information and progressive damage because of the conversions on each session. However, this doesn’t prevent you from exporting to other alien formats. Only, do it only once when you send to external recipients and consider it is a read-only copy you won’t edit later. You work exclusively on the .odt original.

Thank you for the advise. But I’m afraid the core problem remains.

I have been using Microsoft Word for years, including during the planning and much of the writing of my current book.

By default, a paragraph-break on Word has an effect of producing a double-spaced break. A line-break however, moves the cursor to the next line without leaving a bigger gap.

On Libre Writer, however, the default paragraph-break looks the same as a line-break on Word. Upon migrating to Libre, I therefore modified the default settings to mimic Word.

The choice of both single-line spaced paragraph-break, and a double-line spaced paragraph-break, seems essential in all contexts, not only my book. It seems too obvious to explain. For example, in my original post, I use double-space to separate points, and single-space when listing the potential steps for resolving my problem.

As for my (fictional) book, I use single-space (line-break (+ indent via Tab button)) to separate paragraphs, and double-space (paragraph-break with MS Word’s default spacing) to separate scenes. These scenes do not have headings and it makes no sense to change this. There are also hundreds of them, with lengths varying from 1-30 (single-space line-break) paragraphs.

I hope it now more clear why I wish to replace all paragraph-breaks with double paragraph-breaks, and all line-breaks with paragraph-breaks. I take seriously your warning on double-paragraph breaks potentially causing formatting issues, but it still seems like my best solution. I may be convinced otherwise.

Most of all, I want to be able to effortlessly alternate between single and double spaced paragraph breaks, as I have done for years, without causing major formatting problems (by relying on line-breaks or double paragraph breaks)

[ironic side-note: I don’t know why the forum isn’t doubling the spacing of my paragraphs properly when I hit reply. While editing, they are separate like in my original post]

The rationale in Word and Writer is fundamentally different. Writer is intended to work with styles which mark up the significance of your text. This markup can be “synthetic” (valid for a full paragraph, indicating an elaborate point as straight-to-the-topic, annotation, comment, …) or “detailed” (singling out a word as emphatic, ironic, neologism, understatement, …). This is the primary role of styles, far before the appearance (font face, size, weight, slant, colour, ornament, …).

Therefore, if some of your paragraphs deserve single spaced separation, others double spaced separation, they should be tagged with different paragraph styles. Don’t abuse line-breaks. Line breaks are internal to paragraphs; they don’t create boundaries. Using them instead of paragraph breaks will lead you to huge problems when you try to tune your formatting because what you change in the paragraph will not be limited to text between two line breaks: the whole paragraph will be affected.

Styles are really your friends. And if you’re looking for a procedure as convenient as Shift to make a distinction between line and paragraph break, you can define your own keyboard shortcut(s) for your style(s) in Tools>Customize.

Regarding the “default” paragraph style, you again meet a founding difference between Word and Writer.

  • in Word, Default is intended for the document main topic
  • in Writer, style organisation is more complex: there is an ancestor chart-like structure where styles inherit initially from their ancestor, only overriding some of the attributes
    The consequence is apparent when you modify an attribute in the ancestor. If this attribute is not overridden in the descendant, it is also modified. This feature is the base tool to design, maintain and operate a graphical charter.

In Writer, Default Paragraph Style is not intended to be used for main topic text. It is the ancestor to all others and sets the atributes shared by all others (default font size, face, spacing, language, …). Style for the main topic is Body Text.

Don’t use Tab here. Paragraph styles have a setting called First Line Indent to automatically offset your first line, either indented or hanging (which you can’t achieve with a tab). Semantically, Tab is reserved as a separator for tabular data. And even in this case, there is a better feature, a table.

This site is not a forum. It is a Question & Answers one. It has a simplified set of formatting rules. Basically, it is HTML. In HTML, white space (spaces, tabs, line breaks, …) are merged and reduced to a single occurrence. Thus, multiple line ends reduce to a single one (except in Answers which seem to have a different set of rules). My trick to space paragraphs is to insert HTML element <br> at start of paragraph.

1 Like

Thank you for all the helpful information.

Styles are really your friends

Should be your username. You’ve convinced me.

This site is not a forum.

Never mind above comment.

I have a follow-up question, but think it will be more helpful to the community if I post separately: How to create custom shortcut for new paragraph in X style?

1 Like