What happens when I delete a paragraph mark?

If I’m in the middle of a paragraph and hit Enter, I get two more or less identically formatted paragraphs. So far so good.
If I have two identically formatted paragraphs, and I remove the paragraph mark between them - either by Backspace, Delete, or Select+Cut - I get a single paragraph with that same formatting and the combined text from the original paragraphs. No surprises there either.

But, if I have two consecutive paragraphs that are formatted differently — and I’m not talking about the text formats, but rather the bits set through Format»Paragraph… — and I somehow cause the paragraphs to merge by removing the paragraph mark between them, well…? Can somebody explain to me what happens then? I have never been able to make sense of it.

I can tell you what doesn’t happen, which is what I’d want. Specifically, if I’m at the end of the 1st paragraph and use the Delete key to remove the paragraph mark, I’d want the 1st paragraph’s formatting to win over that of the 2nd. Likewise, if I’m at the beginning of the 2nd paragraph and use Backspace to remove the paragraph mark I’d want the 2nd paragraph’s formatting to win over that of the first. Because if that happened, then I’d be in control of the result, and I could easily get the desired outcome.

What actually happens, though, is completely opaque to me, and I’ve been trying to understand it since before the OpenOffice / LibreOffice split. I’d really like a mental model of what happens so that this most basic of editing operations becomes predictable to me, or dare I hope even useful to me. As it is, I’m almost always surprised, and not in a pleasant way. Please, explain it to me like I was 10. Or 90. I’m baffled. Thanks!

If you delete the paragraph then the Paragraph Style of the first paragraph is applied to the second paragraph. No matter how you delete.

Direct Formatting such as applying Bold, changing the colour on the toolbar, or altering the size on the toolbar is not affected by deleting the paragraph mark because the formatting is applied to the characters, not the paragraph. Direct Formatting will always cause problems and should be avoided

I strongly suggest you use styles to format your document, it will make your life easier and will reduce problems in large documents or ones you need to export to another format. The style you should use for the body of your work is Text Body, this is easily applied to any paragraph by pressing Ctrl+0 (Ctrl+1 = Heading 1. Ctrl+2 = Heading 2, etc.). If you have applied Direct Formatting then that overrides the paragraph style; it can be removed by selecting the text and pressing Ctrl+M, or click Format > Clear direct formatting.

There is a lot of information on using styles in the Writer Guide, start with Chapter 4, then 9. Download from English documentation | LibreOffice Documentation - LibreOffice User Guides

1 Like

This also applies to paragraph direct formatting - or rather, its paragraph-specific properties, the format applied when you do the “Format»Paragraph”, as @utoddl asked. So @utoddl, please provide specific scenario(s), best with a sample document, to explain the action and specific unexpected outcome.

Note that there are also character-specific properties that may be defined as paragraph direct formatting, and also there is character direct formatting. These behave a bit differently - but they both do not fit into “Format»Paragraph” piece of the question, so likely are unrelated.

You are not. As said before: The first paragraph wins. So the work-around to get the style of the second paragraph would be to copy some part of the second paragraph in front of the first, combine with first and delete copied text from front of first paragraph. But I doubt this is easier than changing the style from the sidebar after combining both paragraphs.
.
You could file this as request for enhancement (use style of last positions paragraph when deleting paragraph marks). Never missed this feature until now…

1 Like

A workaround that I use to share the style of a lower paragraph:
Having two paragraphs (A and B), I move upward the B paragraph (Ctrl+Alt+Up arrow), put the cursor at the end of B paragraph (now the upper), Delete (to share style), Enter, move downward the B paragraph (Ctrl+Alt+Down arrow).

2 Likes

If only that were true! At least it would be more predictable.

Taking that rule as the “normal” behavior does help, though, and I appreciate having some ground rule to start from. Now it’s a matter of understanding and recognizing conditions which cause deviations from that ground rule. For example, if the first paragraph is empty, that rule doesn’t apply. I’ll need to do more testing with various combinations of empty and non-empty paragraphs to ferret out all the exceptions. But at least now I have a starting place, so thanks very much for that.

You don’t have to convince me wrt styles. I’ve been preaching that sermon since styles were first added to Microsoft Word, back when it was packaged with a mouse because PCs didn’t have them. In fact, I wish there were a way to not only remove all direct formatting, but to totally disable direct formatting in the UI. “You want a different format for something? Then make a style and apply it.” Unfortunately most of the documents I work with are one- or two-page piano recital programs created by others, and they are chock full of blank paragraphs, tabs, spaces, and fonts combined in the most creative ways imaginable.

Oh, you did say the Paragraph Style of the first paragraph is applied to the second. Fair enough. That may be the case, regardless of the content. Unfortunately, styles are not the issue. It’s the direct formatting. I don’t get to wish away the original problem. Assume all the initial paragraphs are the Default style. (Because, in practice, they unfortunately are.)

If your concern is about direct formatting, it is unaffected by paragraph mark deletion. The matter is complicated by the fact there are two layers: paragraph and character. In case, there is conflict in the paragraph layer, it is likely that the first paragraph settings will take precedence just as is the case with styles. But character direct formatting is not affected. When you start typing, the state at point of insertion is used for new characters. Your trouble comes probably from the character layer because there is no management rule apart from clearing it (which also clears paragraph settings).

Thanks, @ajlittoz . That helps inform my mental model, which I’m sure will eventually take some of the unwelcome adventure out of my Writer experience.

My hope is to abandon my current practice of inserting empty sacrificial paragraphs when restructuring text, and learn to think of the text the way the designers of LibreOffice do/did. There seem to be lots of non-obvious interactions to be aware of though.

<grampa_alert>Back in the glory days of Word, before Windows, all paragraph formatting - direct or styled - lived in the each paragraph’s mark, which you could select, copy, cut, paste, etc. just like any other character. If you copied one and pasted it elsewhere, all the immediately preceding text became a paragraph with that formatting. No exceptions. It was extremely easy to understand and explain to new users. (And, probably to implement, which would explain it.) That went away at some point, and I’ve missed it ever since.</grampa_alert>

Thanks, @LeroyG ! I will definitely use that tip. Whether it is a stroke of genius or a genius having a stroke I’m not sure, but it will be extremely handy either way.

The biggest weakness of this approach is the creation of “anonymous” paragraph styles. And even when you copied the mark, you created yet another anonymous style. This prevents you from being able to centrally control your formatting. Everything must be done manually on each paragraph in turn.

Writer developed the notion of styles well beyond the simplistic view of initial Word by adapting the concept to several layers: page, paragraph, character (in very broad terms). However, in order not to completely disorient newcomers, the switch to styles was not forced on them and direct formatting was kept as a transitional measure.

Unfortunately, the dominant market share of Word has turned its approach as THE “intuitive” fits-for-all formatting method, while styling seems to me having been inherited from DTP apps like Quark XPress.

But, styling must not be thought as formatting. If you follow this, you’ll inevitably bump into difficulties when you try to tune your look-and-feel. Styling must be understood as a semantic markup of your document, independent from its final form. A simple document has a title (Title) with headings (Heading n) and discourse (Text Body), eventually comments (paragraph style to be defined), notes (Footnote or Endnote), … Within text, some words are important (Emphasis or Strong Emphasis) or come from foreign language (character style to be defined). Sentences may be ironical, humorous or paradoxical (again character styles to be defined). Etc. I think you see the picture.

The difficulty when coming from Word is the multiplicity of style categories because Word knows only of paragraph styles.

Once your text is semantically marked up with styles, you tune your styles until you’re satisfied with the look, never editing the text in any way!

1 Like