I'm trying to get a caption to span the figure width on a wrapfig environment. But for some reasons it just won't go. Here is my code and a graphical representation:
\begin{wrapfigure}{R}{0.3\textwidth}
\vspace{-30pt}
\label{fig:UbiContentClass}
\ffigbox[\textwidth]
{
\caption{A classe que define Conteúdo Ubíquo}
}
{
\includegraphics[width=\textwidth]{figs/UbiContentClass.png}
}
\vspace{-20pt}
\end{wrapfigure}
Best Answer
Use
\ffigbox[\FBwidth]
instead of\ffigbox[\textwidth]
. This will equal the caption width to that of object. Here is a screen shot fromfloatrow
documentation for more details.The MWE for your case: