[Tex/LaTex] Different width for caption and floatfoot with floatrow

captionsfloatrowwidth

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}

Best Answer

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.

Related Question