I'm not sure of the name of what I need. I would like to set some text in a box or sidebar, as I've seen in some textbooks. The main text will refer the reader to the sidebar for more details. I would like this shaded. There is too much text for marginpar
. I could just use a float figure? I'd prefer it to be half the width of the page though. Is there an easy way to achieve this? I'm not sure what search terms to use to find out about this.
[Tex/LaTex] Box or sidebar for additional text
boxesfloats
Related Question
- [Tex/LaTex] Positioning of text (box) relative to other text
- [Tex/LaTex] Making a fake figure that holds a text box of specified dimensions
- [Tex/LaTex] Framed box, over framed text with image
- [Tex/LaTex] Box for multiple lines and automatic width
- [Tex/LaTex] Option for figure to appear just before the first reference in the text
Best Answer
You can do this, with certain restrictions, using the
wrapfig
package together withmdframed
ortcolorbox
. Here's a little example usingtcolorbox
:And a solution with
mdframed
:Since both
mdframed
andtcolorbox
are highly customizable, you can obtain pretty easily the desired layout for the colored box.And now, the bad news. Since wrapfig is being used, some restrictions will have to be observed; in particular, the package documentation mentions these: