6

I am using the floatrow package. I would like to define a separate width for both the caption above and the \floatfoot below the floats.

I want the caption to span the entire width of the page, but I want the \floatfoot to only be as wide as the float object.

I can get both the caption and the \floatfoot to be the same width as the figure, but I am just not sure how to decouple the two from eachother. I had considered using the \RawCaption command, but I don't quite understand how to use it.

Here is my MWE. In this, the width of the caption and the \floatfoot are coupled together. I want the caption to maintain the original width (which I believe is \textwidth), and I only want the floatfoot to be altered to \FBwidth.

\documentclass{article}

\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{floatrow}
\usepackage{siunitx}

\begin{document}

\begin{figure}
\floatbox[{\captop}]{figure}[\FBwidth]
  {\caption{Selected Interatomic Distances of Protons in $\beta$-Pinene Normal Lactone}%
   \label{fig:noeDistances}}
  {\includegraphics{nOeDistances}
   \floatfoot{\textsuperscript{1}All distances reported are in \si{\angstrom}.\\
   \textsuperscript{2}Selected carbon numbering is given in cyan.}}
\end{figure}

\end{document}

1 Answer 1

7

You can use \RawCaption outside the \floatbox command:

\documentclass{article}
\usepackage{floatrow}
\usepackage[demo]{graphicx}
\usepackage{siunitx}
\usepackage{caption}

\begin{document}

\begin{figure}
\RawCaption{\caption{Selected Interatomic Distances of Protons in $\beta$-Pinene Normal actone}\label{fig:noeDistances}}\vskip\captionskip
\floatbox[{\captop}]{figure}[\FBwidth]
    {}
    {\includegraphics{nOeDistances}
    \floatfoot{\textsuperscript{1}All distances reported are in \si{\angstrom}.\\ \textsuperscript{2}Selected carbon numbering is given in cyan.}}
\end{figure}

\end{document}

enter image description here

Notice the \vskip\captionskip to obtain the default vertical separation between the caption and the image as implemented in the floatrow package.

I used the demo option for graphicx in order to replace the actual figure with a black rectangle; do not use that option in your actual code.

6
  • Wonderful thank you so much, and for such a quick response!
    – J M
    Jul 20, 2012 at 11:46
  • @JM without this additional space, the caption will appear too close to the figure; you need to use the proper value (which I can't remember right now). Jul 20, 2012 at 16:46
  • Hi Gonazlo, Sorry, I had deleted the comment, as I wasn't sure if I should be placing it in a new question or not, still learning the format of this forum here. Do you have any suggestion of where I can look to find this value? Thank you for the quick response, it's very appreciated!
    – J M
    Jul 20, 2012 at 16:47
  • 1
    @JM if you give me some time, I'll look the exact value up and will update my answer as soon as I can (right now I am kind of busy with other stuff). Jul 20, 2012 at 16:50
  • 1
    @JM I've updated my answer with the proper value for \vskip: \captionskip. If the floatrow package is not used, you will need \abovecaptionskip instead. Jul 20, 2012 at 19:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .