# How to use tabular/array to arrange figures [duplicate]

Possible Duplicate:
How to use images in a table?

I'm looking for a solution for automatic alignment of figures within my tex-file. I would like to keep it as simple as possible. I have the following idea but don't know how to implement it. Has anyone a suggestion?

\begin{tabular}{ll}
%\hline
\begin{figure} \includegraphics{pic.eps} \end{figure} & \begin{figure} \includegraphics{pic.eps} \end{figure} \\
\begin{figure} \includegraphics{pic.eps} \end{figure} & \begin{figure} \includegraphics{pic.eps} \end{figure} \\
\begin{figure} \includegraphics{pic.eps} \end{figure} & \\
%\hline
\end{tabular}


Of course it would even be much more better, if I'd just type in the following and LaTeX will generate a two column table which will break automatically.

\begin{tabular}{ll}
\includegraphics{pic.eps}
\includegraphics{pic.eps}
\includegraphics{pic.eps}
\includegraphics{pic.eps}
\includegraphics{pic.eps}
\end{tabular}


Here is how I would like it to be in the end

-

## marked as duplicate by qubyte, Seamus, egreg, Peter Grill, Stefan Kottwitz♦Feb 15 '12 at 13:15

Hint: You don't need to wrap \includegraphics in a figure environment. In this instance you don't want images to float. You'll probably have to do the table manually though. –  qubyte Feb 14 '12 at 12:41
You get more horizontal space out of your tabular environment if you change \begin{tabular}{ll} to \begin{tabular}{@{}ll@{}}. –  Marc van Dongen Feb 14 '12 at 13:10
If you have a specific width of your graphics (let's say about .48\textwidth or something like that, you might also use the subfigure package, http://ftp.twaren.net/Unix/TeX/CTAN/obsolete/macros/latex/contrib/subfigure/subfigure.pdf using the example 3.1 (page 15) using the package option raggedright. Advantage of this approach would be, that the other package options and vertical alignments, if you have 2 images of different height in one line. And of course - subfigure captions, which I really like.
The subfigure package is obsolete (the link you posted might have been a clue) and has been replaced by the subfig package. Another modern alternative is the subcaption package. See subcaption vs. subfig for details. –  Alan Munn Feb 14 '12 at 13:50
Thanks for the advice. Of course my idea also works with ctan.tug.org/tex-archive/macros/latex/contrib/subfig/subfig.pdf (and yes i was a little lazy not looking at the URL), though i couldn't find the raggedright package option in there just now. –  Ronny Feb 14 '12 at 13:57