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 am using the subfloatrow environment (provided by the floatrow package) to organise the layout of figures for my thesis. For the MWE provided below, the numbering of the sub-figures in the second figure incorrectly starts at (c) rather then (a).

Can anyone tell me why this occurs and how best to fix it?

I haven't had this issue previously so am wondering if it is related to my usage of the subfloatrow* environment and \RawCaption in the second figure.

    \documentclass[a4paper]{article}

    \usepackage[margin=20mm]{geometry}
    \usepackage[sc,osf]{mathpazo}
    \usepackage{fix-cm}
    \usepackage[euler-digits]{eulervm}

    \usepackage{amsmath,amssymb}

    \usepackage[T1]{fontenc}
    \usepackage{textcomp}

    \usepackage[format=plain,indention=10pt,font=small,labelfont=bf]{caption}
    \usepackage[justification=raggedright,font=scriptsize,labelfont=]{subcaption}

    \usepackage[facing=yes,capbesideposition={inside,center}]{floatrow}
    \floatsetup[table]{style=plaintop}
    \floatsetup[subfigure]{style=plain}

    \usepackage[pdftex]{graphicx}    

    \begin{document}    

    \begin{figure}[ht!]
    \centering
    \ffigbox{%
    \begin{subfloatrow}[1]%
    \ffigbox[\FBwidth]{\includegraphics*[scale=1.0]{blank_figure.pdf}}{\caption{Condition A}}
    \end{subfloatrow}
    \vspace{1ex}

    \begin{subfloatrow}[1]%
    \ffigbox[\FBwidth]{\includegraphics*[scale=1.0]{blank_figure.pdf}} {\caption{Condition B}}
    \end{subfloatrow}
    }{\caption{Overall caption of first set of figures.}}
    \end{figure}    

    \begin{figure}[p]
    \vspace{-4ex}
    \ffigbox{}{
    \begin{subfloatrow*}
        \ffigbox[\FBwidth]{\includegraphics*[width=77mm,height=78mm]{blank_figure.pdf}}{\subcaption{Molecular Nitrogen}}
        \ffigbox[\FBwidth]{\includegraphics*[width=77mm,height=78mm]{blank_figure.pdf}}{\subcaption{Molecular Oxygen}}
    \end{subfloatrow*}
    \vspace{1ex}

    \begin{subfloatrow*}
        \ffigbox[\FBwidth]{\includegraphics*[width=77mm,height=67mm]{blank_figure.pdf}}{\subcaption{Atomic Nitrogen}}
        \ffigbox[\FBwidth]{\includegraphics*[width=77mm,height=67mm]{blank_figure.pdf}}{\subcaption{Atomic Oxygen}}
    \end{subfloatrow*}
    \vspace{1ex}

    \begin{subfloatrow*}
        \ffigbox[\FBwidth]{\includegraphics*[width=77mm,height=67mm]{blank_figure.pdf}}{\subcaption{Nitrous Oxide}}
        \ffigbox[77mm][67mm][c]{}{\RawCaption{\caption{Overall caption for second set of figures.}}}
    \end{subfloatrow*}
    }
    \end{figure}

    \end{document}
share|improve this question

1 Answer 1

up vote 4 down vote accepted

Since your example document is fine when using caption v3.2f this is either a bug in the actual version v3.3 or an incompatibility between caption and floatrow caused by the re-implementation of the counter handling in caption v3.3 (which became necessary due some issues of the old counter handling). However, since floatrow is not supported by its author anymore I need to fix this anyway, which I will do within the next weeks.

Until then you can reset the sub-figure counter for yourself as workaround, this can be done with \setcounter{subfigure}{0}:

\documentclass[a4paper]{article}

\usepackage[format=plain,indention=10pt,font=small,labelfont=bf]{caption}
\usepackage[justification=raggedright,font=scriptsize,labelfont=]{subcaption}

\usepackage[facing=yes,capbesideposition={inside,center}]{floatrow}
\floatsetup[table]{style=plaintop}
\floatsetup[subfigure]{style=plain}

\usepackage[demo]{graphicx}    

\begin{document}    

\begin{figure}[ht!]
\centering
\ffigbox{%
\begin{subfloatrow}[1]%
\ffigbox[\FBwidth]{\includegraphics*[scale=1.0]{blank_figure.pdf}}{\caption{Condition A}}
\end{subfloatrow}
\vspace{1ex}

\begin{subfloatrow}[1]%
\ffigbox[\FBwidth]{\includegraphics*[scale=1.0]{blank_figure.pdf}} {\caption{Condition B}}
\end{subfloatrow}
}{\caption{Overall caption of first set of figures.}}
\end{figure}    

\begin{figure}[p]
\setcounter{subfigure}{0}% THIS LINE ADDED
\vspace{-4ex}
\ffigbox{}{
\begin{subfloatrow*}
    \ffigbox[\FBwidth]{\includegraphics*[width=77mm,height=78mm]{blank_figure.pdf}}{\subcaption{Molecular Nitrogen}}
    \ffigbox[\FBwidth]{\includegraphics*[width=77mm,height=78mm]{blank_figure.pdf}}{\subcaption{Molecular Oxygen}}
\end{subfloatrow*}
\vspace{1ex}

\begin{subfloatrow*}
    \ffigbox[\FBwidth]{\includegraphics*[width=77mm,height=67mm]{blank_figure.pdf}}{\subcaption{Atomic Nitrogen}}
    \ffigbox[\FBwidth]{\includegraphics*[width=77mm,height=67mm]{blank_figure.pdf}}{\subcaption{Atomic Oxygen}}
\end{subfloatrow*}
\vspace{1ex}

\begin{subfloatrow*}
    \ffigbox[\FBwidth]{\includegraphics*[width=77mm,height=67mm]{blank_figure.pdf}}{\subcaption{Nitrous Oxide}}
    \ffigbox[77mm][67mm][c]{}{\RawCaption{\caption{Overall caption for second set of figures.}}}
\end{subfloatrow*}
}
\end{figure}

\end{document}

P.S.: https://sourceforge.net/p/latex-caption/tickets/6/

Addendum (2013-04-14)

It was indeed an incompatibility between the floatrow package and the new counter handling of the caption package v3.3, which I bypass now with an extension of the corresponding macro \FR@loc@ provided by the floatrow package.

I will upload a new version of the caption package bundle ASAP. Impatient ones can get the current version here:

https://sourceforge.net/p/latex-caption/code/HEAD/tree/trunk/tex/

share|improve this answer
    
Thanks Axel. I am indeed using caption v3.3. I was reasonably sure that I could manually reset the counter but couldn't remember how. Even so I thought that I should raise this, particularly given that counters are something LaTeX usually handles so well. –  luke Mar 20 '13 at 8:58

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.