How to Remove Gray Shading From Behind Text

How to Remove Gray Shading From Behind Text in Libre Writer odt document

Without more information it is difficult to know what is happening. Is for example the grey background behind fields - page numbers, table of contents info, etc?

When I copy text from webpage and paste it there’s lines alternating White Grey. I wont to get rid of the grey so as to print the document…

Most probably it is a table.

Edit 2: @ajlittoz comment has the answer. I had left the option Cell when Table was needed.

You will need to edit the content.xml file and manually change the table value of fo:background-color (#cccccc in my sample) to transparent.

<style:table-properties ...some code ommited... fo:background-color="#cccccc">
<style:table-properties ...some code ommited... fo:background-color="transparent">
*Tested with LibreOffice 6.4.7.2 (x64); OS: Windows 10.0.*

Edit: My Index and table shading is set to Automatic, and changing it to Red don’t work here. A sample file to test (Taken from https://www.smn.gob.ar/).


Add Answer is reserved for solutions.

@LeroyG: Can’t this be done with Tools>Options, LibreOffice>Application Colors, Text Document, Index and table shadings? Caution! Here word “table” should be understood as data created with Insert>TOC & Index>…, not the tables created by Table>Insert Table.

I always prefer to go through official configuration procedures rather than patching the XML which can prove catastrophic in case of error.

@LeroyG: the sample file contains an “ordinary” table (not an index or TOC) with a light gray background. This background can be routinely changed with Table>Properties, Backgraound tab, Table menu selection. Note that the background has been applied to the table, not cell or row; so select the correct “layer” with the menu.

Nothing special here. As said, using the official configuration tools is much more reliable and safe than playing with the XML.

Mine is to report that I have the SAME issue. Up to a point the text I entered has gray shading behind it. When I go to Format>Text there is nothing. WHen I go to Format>Paragraph and select Borders, FIRST the Borders TAB goes BLACK. but then I see under “User-defined” a GRAY square in the center of the box and under Color, “Gray 6” appears but it is disabled, meaning I am unable to reset it!

I TRIED format painter but that was of no help.
I ALSO tried Clone Formatting to no avail.

There were nearly 11 pages of that gray-background formatting then it STOPPED.
Exported to Word 365 it became DARK BLUE and I wasn’t able to change it IN Word!

CORRECTION:

I may HAVE an answer if you HAVE Word 365 - it appears that IN Word the “Clone formatting” DOES work!! But it may NOT work across page boundaries. - apparently it DOES work across page boundaries. File is FIXED using Word 365 and restored as an ODT file.

The QUESTION, however, is how this formatting came about in the FIRST PLACE? I’ve used both release and development versions of LibreOffice (and I DO donate, by the way)… so I have no clear history of the creation of this document.

You have posted a question, not an answer. Consider starting a new question.
Can you upload a sample file showing the issue with your new question.

The gray background you see is called a Field Shading. Yo can hide it in the menú: View > Field Shadings or with Ctrl + F8. They are nonprinting characters.