I'm trying to insert an image with a rectangular border, and that rectangular border has a gray color, something like this:
This is my code:
\begin{figure}
\lineskip=-\fboxrule
\textcolor{Orange}{
\colorbox{Gray}{
\fbox{\begin{minipage}{\dimexpr\textwidth-2\fboxsep-2\fboxrule}
\centering
\includegraphics{imagenes/ejemplo_cubo_OLAP.png}
\abovecaptionskip=0pt
\textcolor{Gris}{\caption{\sffamily{\textbf{The caption text}}}}
\end{minipage}
}
}
}
\end{figure}
And the result I get is this:
As you can see, the gray fill is spilling over the edge, and that's what I want to avoid. Keep in mind that I am very new to Latex