subfloatrow:不正确的连续编号

subfloatrow:不正确的连续编号

我正在使用subfloatrow环境(由floatrow包)来组织论文的图表布局。对于下面提供的 MWE,第二张图中子图的编号错误地从 开始,(c)而不是(a)

谁能告诉我为什么会发生这种情况以及如何最好地解决它?

我以前没有遇到过这个问题,所以想知道这是否与我的subfloatrow*环境使用情况以及\RawCaption第二张图有关。

    \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}

答案1

由于您的示例文档在使用 v3.2f 时没有问题,因此caption这要么是实际版本 v3.3 中的错误,要么是v3.3中计数器处理重新实现导致的caption与之间的不兼容性(由于旧计数器处理的一些问题,这是必要的)。但是,由于作者不再支持,所以我无论如何都需要修复这个问题,我将在接下来的几周内完成。floatrowcaptionfloatrow

在此之前,您可以自行重置子图计数器作为解决方法,方法如下\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}

附言:https://sourceforge.net/p/latex-caption/tickets/6/

补遗 (2013-04-14)

这确实是floatrow包与包 v3.3 的新计数器处理之间的不兼容问题,现在我用包提供的caption相应宏的扩展来绕过它。\FR@loc@floatrow

我会尽快上传新版本的caption软件包。急不可耐的用户可以在这里获取最新版本:

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

相关内容