When I insert a shadowbox using Lyx (Insert>Box>Drop Shadow) the width is specified as 100% of column width (1\columnwidth
). This is the source code it generates:
\shadowbox{\begin{minipage}[t]{1\columnwidth}%
My shadowbox content goes here.%
\end{minipage}}
The column width seems like a poor default choice since any indentation moves the shadowbox into the right-hand margin.* I'd like to make the line width (1\linewidth
) the default width so boxes only extend up to the right-hand margin.
I tried redefining the \shadowbox
command in my preamble but the parameter I'm trying to change is actually part of the \minipage
inside the shadowbox and I haven't figured out how to access it.
I've also tried redefining the width of the frame based on this excerpt from the documentation:
\shadowbox
The width of the frame is \fboxrule (the same as with \fbox). The width of the shadow is \shadowsize (default: 4pt).
by adding this line to my preamble:
\setlength{\fboxrule}{\linewidth}
It did not produce the results I expected (below). Is there a straightforward way to specify shadowboxes use line, not column, width by default?
Footnotes
* The shadowbox command was redefined in my preamble to ignore paragraph indenting
\let\oldshadowbox\shadowbox
\renewcommand{\shadowbox}[1]{%
\noindent \oldshadowbox{#1}}
But sometimes indentation is preferable such as when placing shadowboxes under list items
\linewidth
is OK for you? You just only to make it as a default when using the menu to insert the box?\fboxrule
does only change the thickness of the frame but not the width of the box itself. (Well, in same sense it did ;-))