# why doesn't latex start a new page when showing multiple figures

\documentclass{article}
\usepackage{graphicx}

\begin{document}

\begin{figure}[ht]
\begin{center}$\begin{array}{ccc} \includegraphics[width=2in]{stick/Alexis_view1.png}& \includegraphics[width=2in]{sdk/Alexis_view1.png}& \includegraphics[width=2in]{sdk_extension/Alexis_view1.png} \\ \includegraphics[width=2in]{stick/Alexis_view2.png}& \includegraphics[width=2in]{sdk/Alexis_view2.png}& \includegraphics[width=2in]{sdk_extension/Alexis_view2.png} \\ \includegraphics[width=2in]{stick/Hongzhu_view1.png}& \includegraphics[width=2in]{sdk/Hongzhu_view1.png}& \includegraphics[width=2in]{sdk_extension/Hongzhu_view1.png} \\ \includegraphics[width=2in]{stick/Hongzhu_view2.png}& \includegraphics[width=2in]{sdk/Hongzhu_view2.png}& \includegraphics[width=2in]{sdk_extension/Hongzhu_view2.png} \\ \includegraphics[width=2in]{stick/Kiki_view1.png}& \includegraphics[width=2in]{sdk/Kiki_view1.png}& \includegraphics[width=2in]{sdk_extension/Kiki_view1.png} \\ \includegraphics[width=2in]{stick/Kiki_view2.png}& \includegraphics[width=2in]{sdk/Kiki_view2.png}& \includegraphics[width=2in]{sdk_extension/Kiki_view2.png} \\ \includegraphics[width=2in]{stick/Liang_view1.png}& \includegraphics[width=2in]{sdk/Liang_view1.png}& \includegraphics[width=2in]{sdk_extension/Liang_view1.png} \\ \includegraphics[width=2in]{stick/Liang_view2.png}& \includegraphics[width=2in]{sdk/Liang_view2.png}& \includegraphics[width=2in]{sdk_extension/Liang_view2.png} \\ \includegraphics[width=2in]{stick/Miao_view1.png}& \includegraphics[width=2in]{sdk/Miao_view1.png}& \includegraphics[width=2in]{sdk_extension/Miao_view1.png} \end{array}$
\end{center}
\end{figure}

\end{document}


Latex==>PDF I'm using the above code to show multiple figures. But latex only prints one page and ignores other figures.

Can anyone explain it and help me solve it?

Thanks,

-

You have placed all your figures in a single array. The array environment can't span multiple pages, and assuming that your images have a height that does not allow them to fit on one page, the remainder of the array is truncated.

You could try using longtable instead, which is a multi-page version of tabular.

-

As @PeterGrill mentioned you could use a multi-page table construct such as longtable but do you need a table at all. If you took your example and deleted

$\begin{array}{ccc} \end{array}$


Then deleted every & and \\ it would work, as each group of three images would form a paragraph so line up horizontally and then the blank line between each group would start a new paragraph so force a line break.

-
 You might only need to start your figure with the \noindent command in some cases. – tohecz Jul 5 '12 at 9:20 well yes perhaps in general, although the MWE is using center so \noindent has no visible effect here. – David Carlisle Jul 5 '12 at 9:27 That's why I added "in some cases", in the sake of completeness ;) – tohecz Jul 5 '12 at 9:36