I tried box with colored background but they don't work properly if the
text is more than one line long as in this case the line is not wrapped
around.
It is possible to get this, but it is not straightforward.

Given that I do not use the feature quite often, the hack I proposed is
fine for me.

Yet, I think it is a feature that would be nice to have natively.

2018-05-04 15:25 GMT+02:00 Bernt Lie <bernt....@usn.no>:

> A couple of years ago, I tried to use Insert/Box/... with colored
> background. I wanted to have greyed background for Examples. Didn’t work
> well... if I included floating objects (Figures, Tables, etc.), the preview
> got messed up. Maybe it works better with floats in ordinary paragraphs – I
> haven’t tested that.
>
>
>
> But if you have simple paragraphs, that might work.
>
>
>
> -B
>
>
>
> *From:* lyx-users@lists.lyx.org <lyx-users@lists.lyx.org> *On Behalf Of *Mario
> D
> *Sent:* Friday, May 4, 2018 13:27
> *To:* lyx-users <lyx-users@lists.lyx.org>
> *Subject:* Background color in a paragraph
>
>
>
> Is there a simple way in lyx to change the background color of some text,
> maybe a paragraph?
>
> I have not been able to find a way to do this natively: the only way I
> could obtain it is by using the "soul" package, then inserting the latex
> code "\hl{" in ERT just before the the text to be highlighted and then a
> closing "}" at its end.
>
> Thanks
>

Reply via email to