Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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...

share|improve this question

1 Answer 1

up vote 5 down vote accepted

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

share|improve this answer
    
Thanks a lot! Is it maybe better to use \DeclareFloatSeparators{bigsep}{\hskip 10\columnsep} in the preamble and then set subfloatrowsep=bigsep within \thisfloatsetup instead of redefining \subfloatrowsep manually (and overwriting it for the rest of the document) and adding \subfloatrowsep between the \fcapside? –  sebschub May 25 '12 at 7:58
    
@SebastianSchubert: Well if you have many floats that may a better idea. Everything depends on your needs. –  Harish Kumar May 25 '12 at 8:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.