How to insert a visible square around a content set in latex?

Am I trying to figure out how books draw a box, perhaps with a different background around the digression / example? Preferably, as would be done in the fox, but a latex solution would also be welcome: D

+6
latex lyx
source share
2 answers

The color package should allow you to use the \colorbox .

Examples ( this page is cited, where you will find more detailed information):

 \colorbox{red}{Black text on red background} \fcolorbox{blue}{red}% {Black text, red background, blue frame} 

If you only need a border and background color, the built-in \fbox{text} command should work fine.

+8
source share

In Lyx, you can do Insert → Box. This creates a Box (Minipage), and you can put your content in it. When you right-click on the block (Minipage) and go to "Settings", you can choose the type of border or even a shadow or a shaded background through the "Decoration". (This should be available directly through the right-click menu.)

Hope this helps :)

+4
source share

All Articles