sidesubfloats....为什么这个错误的代码可以工作而我的“正确”代码却不工作?

sidesubfloats....为什么这个错误的代码可以工作而我的“正确”代码却不工作?

我使用以下代码来获取带有自动标签的 3 x 3 图形,其范围从 ai。如您所见,代码中有一个错误,我使用了sufloatrow几次而不是“subfloatrow”。但是,标签是正确的。而在我的第二个“更正”框中,标签是错误的,每行的标签为 a、b、c,而它们的范围也应该从 ai。

另外,图题的编号似乎有问题,因为它从 3 开始...有人愿意帮我解决这一切吗?因为我在这里有点沮丧 :P

\documentclass{article}
        \usepackage{floatrow}
        \usepackage[demo]{graphicx}
        \usepackage{subfig}
        \usepackage{caption}

   \begin{document}
  \clearpage
\begin{figure}[H]
\ffigbox 
{\begin{subfloatrow}
\raggedright
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 1]{sec_struc_pec_red.pdf}}%
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 2]{sec_struc_pec_red.pdf}}%
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 3]{sec_struc_pec_red.pdf}}%
    \end{subfloatrow}
\begin{sufloatrow}  
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 4]{sec_struc_pec_red.pdf}}%
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 5]{sec_struc_pec_red.pdf}}%
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 6]{sec_struc_pec_red.pdf}}%
    \end{subfloatrow}
\begin{sufloatrow}  
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 7]{sec_struc_pec_red.pdf}}%
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 8]{sec_struc_pec_red.pdf}}%
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 9]{sec_struc_pec_red.pdf}}%
    \end{subfloatrow}}
{\caption{...}}
\end{figure}


\clearpage
\begin{figure}[H]
\ffigbox 
{\begin{subfloatrow}
\raggedright
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 1]{sec_struc_pec_red.pdf}}%
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 2]{sec_struc_pec_red.pdf}}%
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 3]{sec_struc_pec_red.pdf}}%
    \end{subfloatrow}
\begin{subfloatrow} 
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 4]{sec_struc_pec_red.pdf}}%
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 5]{sec_struc_pec_red.pdf}}%
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 6]{sec_struc_pec_red.pdf}}%
    \end{subfloatrow}
\begin{subfloatrow} 
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 7]{sec_struc_pec_red.pdf}}%
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 8]{sec_struc_pec_red.pdf}}%
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 9]{sec_struc_pec_red.pdf}}%
    \end{subfloatrow}}
{\caption{...}}
\end{figure}

    \end{document}

答案1

我不清楚您为什么要使用subfloatrow环境和\ffigbox命令。您可以使用以下代码获取 3x3 数组:

\documentclass{article}
\usepackage[margin=4cm]{geometry}
\usepackage{floatrow}
\usepackage[demo]{graphicx}
\usepackage{subfig}
\usepackage{caption}

\begin{document}

\begin{figure}[H]
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 1]{sec_struc_pec_red.pdf}}\hfill%
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 2]{sec_struc_pec_red.pdf}}\hfill%
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 3]{sec_struc_pec_red.pdf}}\\
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 4]{sec_struc_pec_red.pdf}}\hfill%
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 5]{sec_struc_pec_red.pdf}}\hfill%
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 6]{sec_struc_pec_red.pdf}}\\
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 7]{sec_struc_pec_red.pdf}}\hfill%
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 8]{sec_struc_pec_red.pdf}}\hfill%
    \sidesubfloat[]{\includegraphics[width = 0.2\textwidth, angle = 270, page = 9]{sec_struc_pec_red.pdf}}
\caption{An array of nine figures}
\end{figure}

\end{document}

相关内容