Clear Direct Formatting EXCEPT Bold, Italic and Bold-Italic (BEST ANSWER)

Unfortunately, LibreOffice lacks a direct way to clear all direct formatting EXCEPT bold, italic, and bold-italic when using its in-built Paste Special options; normally, we end up either clearing all formatting and getting just the raw text, or we also receive font information (style and point size) with the pasted text that we do not actually desire to preserve. In other words, if we preserve bold, italic and bold-italic (or strong, emphasis and strong emphasis) character attributes when doing a Paste Special operation, we also end up receiving the font face and font size that had been specified with that text in the source document—which can be a huge problem, and that’s because as soon as we attempt to override the receive and thus pasted font information by specifying a desired paragraph style, it does NOT work: the pasted font and its pasted size are preserved and remain in-place, irrespective of whatever typeface and point size is contained in any paragraph style we try to set. So, we are ordinarily left with only two options: 1) manually override the font specification APART from the paragraph style, or 2) remove ALL formatting, including bold, italic and bold-italic during the Paste Special operation. Neither of those choices is ideal much of the time.

But, there IS a way to effectively paste our text WITHOUT the font face information WHILE preserving the bold, italic and bold-italic character attributes, a way that while a slight hassle, is far less-involved and more reliable than what others have suggested (i.e., the poor “accepted” answers to date).

Ordinarily, when we use Paste Special (V), we receive two options: “Rich text formatting (RTF)” and “Unformatted text”. If we use the first of those, RTF, then we not only preserve bold, italic and bold-italic character attributes in what is pasted, but problematically, we also preserve a) type face (font) and b) type size, when quite often we want neither of those preserved (i.e., we instead want to use the font and font size already in use where we are pasting our text).

HERE’S THE WORKAROUND:

First, go ahead and use “Rich text formatting (RTF)” with Paste Special. Yes, that will result in the type face and font size also being pasted with the text—the thing we do NOT want.

Second, select all the paragraphs of text just pasted, and use the Set Paragraph Style dropdown to select “Default Paragraph Style”.

Third, CHANGE the type face to a font NOT RECENTLY USED IN WRITER, with the Font Name drop-down.

Finally (fourth), again use the Set Paragraph Style dropdown to select the actual paragraph style you want (e.g., one you’ve created).

Once that last step has been done, you will see that your bold, italic and bold-italic formatting is preserved in the pasted text, and that your font is the one you desire (i.e., NOT the one that had originally been present in the copied and pasted text).

IMHO, this hack only shows that your pasted text is badly formatted with a mixture of styles and direct-formatting. Mixing both is the root of all evil.

Always use styles and leave aside direct-formatting. It requires an expert knowledge to be able to use direct-formatting with predictable effects and reliability in formatting maintenance.

The rules for pasted text are pretty simple (assuming you copy from a Writer document, not from “external” source):

  • if the copied range does not include a paragraph break, your text will contain the characters + character style formatting + direct formatting
  • if the copied range includes a paragraph break, your text will contain the characters + paragraph styles (before and after the break in case you straddle it) + character styles + direct-formatting

So, if you don’t want to change he paragraph style when you paste, proceed range after range taking care not to include a paragraph break.

Of course, the best option is consistent styling, without any direct formatting. Thus, copy’n’paste will not mess up your document.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.

You are mistaken. I refer, for example, to pasting text copied from other applications, not just LibreOffice. Other applications (e.g., Scrivener for Windows), in many cases, include not just attributes like bold, italic and bold-italic with the copied text, but also font face and font size, etc. When using Paste Special on such copied text into LibreOffice, the font face and font size information included in the copied text (which cannot be avoided when copying from those other applications), also is pasted, as I stated in my above answer.

It is clear from your above response that you do not have much experience with writing among multiple applications and then copying text from another application into LibreOffice, or you would have understood the point of my post, which is not about copying from one LibreOffice Writer document into another, but from other applications (e.g., Scrivener, etc.) into LibreOffice Writer.

The approach I above outlined is the only current option.

This was not clear at all in the description. In this case, I don’t trust the formatting handed over by the other application. I want to have full style control in my documents. Consequently, I can’t accept any form of direct formatting lest my styles, mainly character ones, lose their role. I value to the highest point ease of formatting maintenance, notably the possibility to replace the graphic charting with another without changing any semantics, expressed through the typographic attributes.

Your scheme is faulty in that it assumes that “bold” is a primary attribute while it is a consequence of markup. What does “bold” mean? Does it correspond to *Strong emphasis", Mandatory or Important character style? It probably depends on context. Then you can’t but style manually what you’ve copied. That why I paste as Unformatted text from foreign apps.

To get my point, what if charting suddenly requires that Important are written red instead?

Actually, my description is perfectly clear. Bold, italic and bold-italic are common descriptions for character formatting, including within paragraphs. But to help you understand, italic = emphasis, in LibreOffice’s terms Strong Emphasis = bold, etc. The issue of pasting from one application to another, in this case LibreOffice Writer, is a common scenario, and in that scenario, there is NO possibility to bring over character styles, since we are talking about two entirely different applications, where the source application (e.g., Scrivener, but it could also be MS Word, etc.) will NOT have the character styling feature of LibreOffice Writer. So, you are mistaken to suggest that pasting unformatted text would in any way be useful, as it would NOT, and that is the whole point. Consider a scenario in which one needs to copy and past many paragraphs, where each of those may have a mixture of character attributes like bold, italic, etc.; we do NOT want to manually re-do all that.

Unfortunately, Italic is not Emphasis. Italic may be also any other character style. E.g. traditional typographic rules mandate that foreign words are rendered italic. So, how would you choose between Emphasis and Foreign Quote (a user-style)?

Where we diverge is you favour visual formatting while I value semantic markup. My workflow brings me maximum freedom at rendering my document to the cost of an initial manual task while yours locks you into a set of rigid assumptions about the significance of visual attributes. These attributes are rather limited in their number and cover various intents from the author. Character styling, which unfortunately does exist in other apps, tries to make a difference between these intents even if they are rendered the same.

You are incorrect again, and moreover, you waste everyone’s time by insisting on a line of argument that bypasses the whole point of what I’ve shared, where you simply ignore the use cases involved. I do not frankly care about your LibreOffice-constricted workflow one bit. What I do care about, and what this post addresses, is how to copy and paste text from other Windows-based writing applications into LibreOffice Writer on Windows, where attributes such as bold, italic and bold-italic are preserved in that copied text, but specified type faces and their font sizes are removed, so that it is not then necessary—as would otherwise be the case when copying substantial amounts of text containing such attributes—to paste with no formatting at all and then having to manually restore those bold, italic and bold-italic attributes to many sections of the copied text. So, please, do not further waste everyone’s time with responses that are wholly irrelevant to the situation being addressed.

YMMV - Acknowledged