[Tex/LaTex] floatrow with subfloatrow and fcapside: adjust placement of captions

captionsfloatrowpositioning

I want put two subcaptions using fcapside into one float. The captions should be placed near the respective figures and the two figures should be separated nicely. I tried the following code:

\documentclass{article}

\usepackage{caption,subcaption,floatrow}
\usepackage[demo]{graphicx}
\usepackage[english]{babel}
\usepackage{blindtext}

\begin{document}

% \thisfloatsetup{capbesidesep=none}
\begin{figure}
  \ffigbox[\textwidth]{
    \begin{subfloatrow}[2]%\useFCwidth
      \fcapside{\includegraphics[width=3cm,height=3cm]{test}}{\caption{}}
      \fcapside{\includegraphics[width=1cm,height=3cm]{test}}{\caption{}}
    \end{subfloatrow}
  }{\caption{\blindtext}}
\end{figure}

\end{document}

This is the result:
Floatrow example

The distance of (a) and (b) to the figures is too large but the figures could be spread more.

What can I do? I played around with almost all settings I could find in the manual. To be honest, having used LaTeX for several years, floatrow is still really hard to master…

Best Answer

You can use the \renewcommand\subfloatrowsep{\hskip 6\columnsep} to increase the figure separation.

\documentclass{article}

\usepackage{caption,subcaption,floatrow}
\usepackage[demo]{graphicx}
\usepackage[english]{babel}
\usepackage{blindtext}

\begin{document}
\thisfloatsetup{floatwidth=.35\hsize,%
capposition=beside,%
capbesideposition=left,%
capbesidesep=none}
\renewcommand\subfloatrowsep{\hskip 6\columnsep} % figure separation is done here

\begin{figure}
  \ffigbox[\textwidth]{
    \begin{subfloatrow}[2]\useFCwidth
      \fcapside[\FBwidth]{\includegraphics[width=3cm,height=3cm]{test}}{\caption{}}%
      \subfloatrowsep
      \fcapside[\FBwidth]{\includegraphics[width=1cm,height=3cm]{test}}{\caption{}}%
    \end{subfloatrow}}
  {\caption{\blindtext}}
\end{figure}    

\end{document}

enter image description here

In the above if you use some side caption text, you will blow up the layout. In such cases, the following can be used.

\documentclass{article}

\usepackage{caption,subcaption,floatrow}
\usepackage[demo]{graphicx}
\usepackage[english]{babel}
\usepackage{blindtext}

\begin{document}
\thisfloatsetup{floatwidth=.45\hsize,capbesidewidth=sidefil,
 capposition=beside,capbesideposition=left,capbesidewidth=3.5cm,%subfloatrowsep={.2\FBwidth},%
 capbesidesep=none,}
 \renewcommand\subfloatrowsep{\hskip 1.5\columnsep} % figure separation is done here

\begin{figure}
  \ffigbox[\textwidth]{
    \begin{subfloatrow}[2]%\useFCwidth
      \fcapside[\FBwidth]{\includegraphics[width=3cm,height=3cm]{test}}{\caption{This is caption for A}}%
      \subfloatrowsep
      \fcapside[\FBwidth]{\includegraphics[width=1cm,height=3cm]{test}}{\caption{This is caption for figure B that is long}}%
    \end{subfloatrow}}
  {\caption{\blindtext}}
\end{figure}    

\end{document}

enter image description here