4

I use the following code to get a 3 x 3 figures with automated labels that range from a-i. As you can see there is an error in the code, I use sufloatrow instead of 'subfloatrow' a few times. However, the labels are correct. While in my second "corrected" box the labels are wrong and are a,b,c for each row while they should also range from a-i.

Aswell there seems to be something wrong with the numbering of the figure captions as it starts at 3... Anyone care to help me out abit with all this? since i'm getting abit frustrated here :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}
0

1 Answer 1

4

It is not clear to me why you are using the subfloatrow environment and the \ffigbox command. You can get your 3x3 array using the following code:

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

2
  • thanks, I was looking at that before, as it's an obvious choice to add \\. However in a different thread someone told me i should make a new subfloatrow for each row.. but as it seems that's not necessary at all.
    – Timtico
    Jun 10, 2011 at 16:07
  • When using the floatrow package with a \documentclass[pdflatex]{sn-jnl} document I get some error messages that "Package floatrow Error: Do not use float package with floatrow.". Which ever way I try I cannot make it work ! sn-jnl is for Springer Nature LaTeX Template Jan 28, 2022 at 2:30

You must log in to answer this question.

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