Does anyone know how I can set up a grey box as background for my images like in this example in the picture below?
I had found a good example in Grey box code and lists but it doesn't work with a picture inside.
\documentclass{article}
\usepackage{color}
\definecolor{lightgray}{gray}{0.75}
\newcommand\greybox[1]{%
\vskip\baselineskip%
\par\noindent\colorbox{lightgray}{%
\begin{minipage}{\textwidth}#1\end{minipage}%
}%
\vskip\baselineskip%
}
\begin{document}
\greybox{Content of Grey Box}
...
// but it doesn't work with picture inside:
...
\greybox{
\begin{figure}[ht]
\footnotesize
\centering
\includegraphics[width=1.0\textwidth]{illustrationen/mygraphic.png}
\begin{flushright}
Some Reference
\end{flushright}
\caption{Title}
\label{fig:label}
\end{figure}
}
\end{document}
Anyone a simple idea for that?


