# Display certain objects in a document side by side

What is the standard way in latex to display certain objects (e.g. pictures, tables, etc.) side by side, instead of one below the other? I thought about using the tabular environment for this, but I'm not sure if there isn't a better way.

-

The standard LaTeX way is minipages.

In order to make sure that your multiple minipages end up on the same line, their horizontal dimensions have to add up to something less than the current \textwidth. So if I care about lining them up, I often use multiples of \textwidth as the minipage widths. Such as

\documentclass{article}
\usepackage{lipsum} % just for demonstration

\begin{document}
\noindent
\begin{minipage}[t]{0.3\textwidth}
\lipsum[1]
\end{minipage}
\hfill
\begin{minipage}[t]{0.6\textwidth}
\lipsum[2-3]
\end{minipage}

\end{document}


The \hfill control sequence inserts an infinitely stretchable amount of glue between the minipages—effectively pushing the second one all the way to the edge of the line. Since the total widths of the boxes is 0.9\textwidth, you get a separation of 0.1\textwidth between the minipages.

Another method is the multicol package, but that's mainly for columns of text side-by-side.

-
It might be worth explaining what the \hfill is doing. – Seamus Feb 8 '11 at 22:18
@Seamus sure thing. – Matthew Leingang Feb 9 '11 at 3:11

the subfigure package works well:

include \usepackage{subfigure} in your preamble, then include the code:

\begin{figure}[ht]
\centering
\subfigure[Caption of subfigure 1]{
\includegraphics[scale=1]{subfigure1.eps}
\label{fig:subfig1}
}
\subfigure[Caption of subfigure 2]{
\includegraphics[scale=1]{subfigure2.eps}
\label{fig:subfig2}
}
\subfigure[Caption of subfigure 3]{
\includegraphics[scale=1]{subfigure3.eps}
\label{fig:subfig3}
}
\label{fig:subfigureExample}
\caption[Optional caption for list of figures]{Caption of subfigures \subref{fig:subfig1}, \subref{fig:subfig2} and \subref{fig:subfig3}}
\end{figure}

-
This is a good answer as subfigure is designed for this specific layout scenario. It appears the subfigure package has been superseded by subfig ctan.org/tex-archive/macros/latex/contrib/subfig/subfig.pdf – Richard Terrett Feb 9 '11 at 3:34

I often tried using boxes and minipages, but resorted back to wrapping these in a tabular environment.

-