localghost - I tried doing this with floatrow as you suggested, but it doesn't seem to respect the 'width' option of includegraphics.
Here is a demo without includegraphics to show that it works:
Code: Select all
\documentclass{article}
\usepackage{floatrow}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\ffigbox[\FBwidth]
{\caption{caption text caption text caption text caption text
caption text caption text caption text caption text
caption text caption text caption text caption text }\label{...}}
{\fbox{Dummy Figure}}
\end{figure}
\end{document}
And then this works correctly (though you need a dummy.png in the folder, but as that is the part I'm troubleshooting I can't make a MWE without it):
Code: Select all
\documentclass{article}
\usepackage{floatrow}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\ffigbox[\FBwidth]
{\caption{caption text caption text caption text caption text
caption text caption text caption text caption text
caption text caption text caption text caption text }\label{...}}
{\includegraphics{dummy}}
\end{figure}
\end{document}
Then finally, this does not work correctly - the caption is wider than the image:
Code: Select all
\documentclass{article}
\usepackage{floatrow}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\ffigbox[\FBwidth]
{\caption{caption text caption text caption text caption text
caption text caption text caption text caption text
caption text caption text caption text caption text }\label{...}}
{\fbox{Dummy Figure}} % replace this with the includegraphics line as below
{\includegraphics[width=.4\linewidth]{dummy}} % the caption does not respect the 'width'
\end{figure}
\end{document}
Any suggestions?
Thanks,
David