# Color Shading Parts of an Output Expression - Is it Possible?

I have a Mma expression made with Print[...], e.g.:

Now I want to give some explanations about some coefficients and for that purpose, I want to highlight e.g. coefficients a13 and a23 in light blue and a31 and a32 in light yellow. In order to do so, I start marking a13 and a23:

Then I select Format > Backgrond Color > Light Blue:

But nothing happens.

Nota bene: The cell onto which I want to apply these operations is editable:

Why can't I add a background color to parts of my printed expression?

How can I achieve the desired result which would look like my second picture above, but the text still being black on light blue background?

Of course I would also like to use other backgrounds to other parts of my expression too, like e.g. light yellow?

• Why are you doing this with Print? In any case on 11 this isn't an issue for me. Maybe your Print style has set. Maybe the box you're printing has something set. It's hard to know what's up unless we know what exactly you're printing. – b3m2a1 Jul 27 '17 at 17:49

I found a very strange and awkward way to do that myself:

1. Mark the cell on its bracket.
2. Press Ctl+Shif+E to show the internal representation of it.
3. Strangely (because as demonstrated above, the cell is shown as editable), at the end of this copied output cell, you see something like this (possibly the cell's creation date is also present there):

Cell[BoxData[InterpretationBox[...
,Editable -> False
]
]
,"Print"
]

4. Change the option Editable -> False to Editable -> True.

5. press Ctl+Shif+E again to return to the normal representation the cell.
6. Mark the fileds which shall be highlighted as you like them.
7. Apply to them the shading as you want them.

8. You might set Editable -> False again similar to steps 1...4.

Bingo! (But not very elegant. Better ways to do it are welcome!)

Who has an idea, why the output cell can't be edited or why it is shown as editable despite it is not editable according to its internal representation?

• If the cell isn't editable you can always go to Cell >> Cell Properties >> Editable to make it so. – b3m2a1 Jul 27 '17 at 17:47
• @b3m2a1: The cell was editable, see in my post above. In order to apply my highlights, I had to go through the Ctl-Shift-E representation as described. Btw: In OptionsInspector for selection (with the cell selected) I see several topics that ca be editable->True/False/Automatic: Notebook Options>File Options (T), .>Notebook Properties (T), Cell Options>General Properties (T), Editing Options (T), Formatting Options>ExpressionFormatting>Specific Box Options>Grid Box Options (A), .>Interpretation Box Options (F). The last one is strange: Is this the clue? – Adalbert Hanßen Aug 2 '17 at 13:16