Currently I've this situation:
\newenvironment{inline}[2]{
\begin{figure}[h!]
\caption{#1}\label{#2}
\vspace{10pt}%
}{
\end{figure}
}
How can I set a background color to whole content, which is in the figure?
|
You can use the
I've only added the Having a caption above the figure, you may be interested in adjusting the lengths In the above MWE, |
||||
|
|
|
One solution could be using the package
This will produce a gray background of
instead of:
if the purpose is to produce a horrible orage background. You have all the freedom you need to define the color |
|||
|
|
|
Besides the For easier comparison (and less work for me ;-) ) I reused Werner's example code. The main difference is that
|
|||
|
|
%. You should therefore always write{%instead if{at the end of a line. – Martin Scharrer♦ Apr 7 '12 at 20:34\abovecaptionskip(usually 10pt) and\belowcaptionskip(usually 0pt) if you want to have it the other way. – Martin Scharrer♦ Apr 7 '12 at 20:44