3

I have copied a code text from StackExchange:

This is the line of code to edit

I pasted that code line in a LibreOffice Writer document and it was pasted with this exact font and grey background in LibreOffice Writer.

To give it a more default appearance I mark it and "clear direct formatting". That changed it only a bit: Aligned it's first line to the left (as it was aligned centered).

If Direct formatting isn't the right tool, what is?

3

I would do it with Paste Special:

  1. Stand with the mouse cursor where you want to paste the text.
  2. Right click the mouse.
  3. Choose Paste Special.
  4. Choose Unformulated text.

The text should look more normal than the "Default Style" solution. However, it only works when pasting rather than in general.

  • +1 for the good solution. Sometimes I wish that any CTRL+C would behave like this... – JohnDoea Mar 15 '18 at 18:07
  • 4
    CTRL+SHIFT+V gets there a bit faster, but it would be nice not to have to use a menu at all. – Max Poschmann Mar 15 '18 at 18:09
  • I usually paste into Notepad first, then copy from there. Serves the same purpose. – Brilliand Mar 15 '18 at 20:50
1

While publishing this question I found something that gave the text a more "default" appearance: I marked it and changed its style to "Default":

enter image description here


From my experience with various versions of Microsoft Word, it might be in LibreOffice Writer as well, that one needs to combine several tools to totally clear non-default formatting (combining clear all direct formatting + change style to default, maybe, and maybe even more tools).

  • Text is displayed as a combination of direct formatting (also known as automatic styles) and common styles. So you need to clear direct formatting + set paragraph style to default + set character style to default. Also, there may be tables or sections that were created, although not in this case. I normally paste as unformatted text instead or copy to a text editor first. – Jim K Mar 15 '18 at 18:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.