how to insert a visible box around a set of content in latex?
Asked Answered
M

2

9

I'm trying to figure out how the books draw a box perhaps with different background around a digression/example? Preferably how this would be accomplished in lyx, but latex solution would be welcomed as well :D

Maladminister answered 8/6, 2010 at 17:43 Comment(1)
texample.net/tikz/examples/boxes-with-text-and-mathQuotable
E
9

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

Examples (cited from this page, where you will find more details):

\colorbox{red}{Black text on red background}

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

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

Exodontist answered 8/6, 2010 at 17:51 Comment(0)
H
6

In Lyx you can do Insert -> Box. This creates a Box (Minipage) and you can put your content inside it. When you right click the Box (Minipage) and go to Settings, you can select type of the border or even drop shadow or shaded background via 'Decoration'. (This should be accessible directly through the right click menu as well.)

Hope this helps :)

Hagioscope answered 3/4, 2011 at 14:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.