Getting Libreoffice to paste text without spacing by default

I often paste text from one document to another and Libreoffice always adds spacing at the end of the last line of the paragraph by default. I am wondering whether there is a way to turn this off by default? I have managed to change the default template so that it is all single spacing which has been great but it is still creating spacing at the bottom of the para when I paste from one document to the other (even when pasting from one of my own documents to another one of my own documents, both of which have single spacing!! I don’t know why Libreoffice is changing the formatting and adding a space at the end!).

There is a fix which is described at When I paste a text into Libreoffice odt, it gets a lot of space between paragraphs?[closed], however there are a number of steps involved and because I paste between documents frequently I was hoping there would be a way to turn this off by default so that I can just copy-paste and have it not add additional formatting that I didn’t have in either document. Thanks very much for any help!

OS name, exact LO version and save format, please

Is View>Formatting Marks enabled? With this hint enabled, when you copy, does the selection end with a paragraph mark? Do you paste before a paragraph mark or over it?

Note that the very last paragraph mark in any document cannot be deleted. Therefore if you paste at the end of the destination document, you’ll get the paragraph mark at the end of the source selection plus the last destination mark. You end up with a final empty paragraph (responsible for the spacing you complain about?).

Writer never adds paragraph marks on its own. It always keep what you feed into it. So, you must be careful about the exact extend of your selections.

Thank you Ajlittoz. I am using Debian with MATE. And I save my documents with .docx I am using Libreoffice 7.4.7.2

I turned on formatting marks and checked. Yes the paragraphs are ending with a paragraph mark. It seems to only allow you to paste before a paragraph mark.

I am confused about your comment “It always keep what you feed into it. So, you must be careful about the exact extend of your selections.”? I am pasting paragraphs with single spacing and no spaces above or below paragraphs, from one document with such formatting, to another document which also has single spacing and no spaces above or below paragraphs so it doesn’t seem to be coming from my end.

I have also noticed that Libreoffice writer randomly changes the font to a different font when I copy paste. For example I have 2 documents that are all Arial font. And when I copy-paste from one to the other, mostly it pastes in Arial font and then randomly it will paste in a different font like Liberation Serif or Arial. Even though I set my default style to Arial. I notice since set my default style to Arial, this problem has reduced but it is still happening. So perhaps there is a broader issue of Libreoffice randomly changing formatting?

Thank you

Spacing in Writer is frequently a mystery for users. Every paragraph is laid out according to a “box model” (you have the same concept in HTML and many other formats). Within this model, text is set in the innermost rectangle. This is where line spacing is significant. This inner rectangle is surrounded by two others: the intermediate one is related to borders and the outer one is dedicated to spacing. Horizontal spacing at left and right is called indent and vertical spacing is called spacing above and spacing below.

These spacing are intrinsic properties of a paragraph and have no text counterpart. In other words, you can’t select “spacing” to copy and paste it. Such spacing always come with the paragraph.

If you don’t want to copy spacing, you must select only text, not a paragraph. This translates as: make sure there is no paragraph mark in your selection. This is why I wrote you must pay attention to your selection.

This may be a consequence of your decision to save .docx. Formatting concepts are radically different in both suites. Notably, DOCX is particularly poor in styling principles. It only know of paragraph styles. Everything else is direct formatting (DF). Therefore you have much less control over formatting maintenance. Direct formatting is always copy-pasted. And since DF has precedence over styles and default configuration, I let you guess what happens.

DF is very hard to detect. It is really an expressway to formatting hell. I suggest you upgrade to a more recent LO release (at least 24.8 – we are presently at 25.8.3.2 in Fedora 43) where Spotlight, a visual style reporting feature, has been improved to also flag DF.

I highly recommend you switch to ODF (.odt) for your documents to avoid the catastrophic cumulative effect of conversion from internal format to DOCX on every save (and yet another conversion on every load).

The only way to sanitise existing documents is to paste text unformatted into a blank document. Any other attempt will leave fossils and traces of DOCX even when your documents were never handled by Word.