Colored Boxes

Richard Kimberly Heck rikiheck at gmail.com
Sun Aug 4 16:20:56 UTC 2024


On 8/4/24 9:12 AM, A-Imam Al-Sammak wrote:
> Dear all
> I am writing a book and I need colored examples contained in colored 
> boxes. I get the boxes but do not know how to number them (and 
> reference them) automatically for each chapter separately as Fig. 1.1 
> and Fig. 1.2, ..

I think you can just put the colored box inside a figure float. But it 
would probably be neater to to create a custom float and custom float 
style. Most of that is a LaTeX thing rather than a LyX thing. See e.g.

https://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions
https://tex.stackexchange.com/questions/95631/defining-a-new-type-of-floating-environment

Getting the new float to show up in LyX requires a little bit of layout 
code, which can be adapated from stdfloats.inc, which can be found in 
the system layout/ directory.

Riki


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20240804/a2c82a93/attachment.html>


More information about the lyx-users mailing list