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}
lockstep
  • 250,273
Timtico
  • 2,250

1 Answers1

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}

Moriambar
  • 11,466
Gonzalo Medina
  • 505,128
  • 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 '11 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 – bhamadicharef Jan 28 '22 at 02:30