3

I suspect this question is slighty related to another question found in subfloatrow: incorrect continued numbering. Trying out the MWE below, the incrementation of the figure number of figure two is omitted. That is, the caption of figures one and two both get the same number, i.e. 1 in this case, and figure three gets the number 2. This happens every time I use subfigures with the subfloatrow environment, as shown below.

\documentclass{report}

\usepackage{caption}
\captionsetup{format=hang,font=small,labelfont=bf,labelsep=colon}
\captionsetup[subfigure]{labelformat=parens,font=small,labelfont=bf,textfont=sl,labelsep=space,list=no}

\usepackage[subrefformat=parens]{subcaption}

\usepackage[captionskip=13pt,facing=yes]{floatrow}
\floatsetup[figure]{margins=centering}
\floatsetup[subfigure]{style=plain,margins=raggedright,heightadjust=object}

\begin{document}
\begin{figure}[hbtp]
    \ffigbox[\textwidth]{%
    \caption{First figure.}
    \label{figure1}}
    {\makebox{\framebox[2.5cm]{\rule{0pt}{2.5cm}}}}
\end{figure}
\begin{figure}[hbtp]
    \ffigbox[\textwidth]{\CommonHeightRow{%
    \begin{subfloatrow}[2]\useFCwidth
        \ffigbox[\FBwidth]{\subcaption{Subfigure a}\label{subfig:a}}{\makebox{\framebox[2.5cm]{\rule{0pt}{2.5cm}}}}
        \ffigbox[\FBwidth]{\subcaption{Subfigure b}\label{subfig:b}}{\makebox{\framebox[2.5cm]{\rule{0pt}{2.5cm}}}}
    \end{subfloatrow}}}{%
    \caption{Second figure with subfigure~\subref{subfig:a} and subfigure~\subref{subfig:b}.}
    \label{figure2}}
\end{figure}
\begin{figure}[hbtp]
    \ffigbox[\textwidth]{%
    \caption{Third figure.}
    \label{figure3}}
    {\makebox[\textwidth]{\framebox[2.5cm]{\rule{0pt}{2.5cm}}}}
\end{figure}
\end{document}

An image of the output:

enter image description here

Could this be a problem with the caption and floatrow packages not working correctly together, as mentioned here, or am I doing something wrong? Is there a workaround?

5
  • Image uploaded :-) Mar 23, 2013 at 23:36
  • Since the example works fine when using caption v3.2f I assume this is either the same or at least a related problem. The floatrow package seem to rely on the old internal behavior of the caption package. Until a fix is available I recommend downgrading to version 3.2f which you'll find here: sourceforge.net/p/latex-caption/code/69/tree/branches/3.2/tex
    – user2574
    Mar 24, 2013 at 9:09
  • @AxelSommerfeldt Thank you very much for the quick reply and the suggested solution. Auf Wiedersehen!
    – MLC
    Mar 24, 2013 at 12:15
  • @GonzaloMedina Thank you for adding the output picture. :-)
    – MLC
    Mar 24, 2013 at 12:20
  • @JosephWright Will do right now...
    – user2574
    Aug 11, 2013 at 11:34

1 Answer 1

3

Original Answer (see comment above)

Since the example works fine when using caption v3.2f I assume this is either the same or at least a related problem. The floatrow package seem to rely on the old internal behavior of the caption package. Until a fix is available I recommend downgrading to version 3.2f which you'll find here: http://sourceforge.net/p/latex-caption/code/69/tree/branches/3.2/tex

New Answer

Yes, as suspected by the questioner it was the same problem as the one mentioned in subfloatrow: incorrect continued numbering, and a fix is available since 2013-04-14.

See also: http://sourceforge.net/p/latex-caption/tickets/6/

You must log in to answer this question.

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