# Two figures side by side

How can I put two figures side-by-side? Not two sub-figures, but two actual figures with separate "Fig.: bla bla" captions. A figure is supposed to spread over the entire text width, but I have two figures which are narrow and long, and I need to save the space in order to withstand the pages limit.

-

Have you tried putting each of them in a minipage environment? They won't float at all, but you can make sure they appear side-by-side.

Edit: This isn't as straightforward as I thought. You can't put a figure environment inside a minipage environment. You get a "not in outer par mode" error.

But as Stefan notes, you can put minipages inside a figure environment and get separate captions!

\documentclass{article}
\title{Two Figures Side by Side}
\author{Little Bobby Tables}
\usepackage{lipsum}
\usepackage{tikz}

\newcommand{\exedout}{
\begin{tikzpicture}
\path node (LL) {}
++ (0.8\textwidth, 0.8\textheight) node (UR) {}
(LL -| UR) node (LR) {}
(LL |- UR) node (UL) {};
\draw (LL) rectangle (UR) (LL) -- (UR) (UL) -- (LR);
\end{tikzpicture}
}
\begin{document}
\maketitle
How can I put two figures side-by-side? Not two sub-figures, but two actual figures
with separate "Fig.: bla bla" captions. A figure is supposed to spread over the
entire text width, but I have two figures which are narrow and long, and I need to
save the space in order to withstand the pages limit.

\lipsum

\begin{figure}
\centering
\begin{minipage}{0.45\textwidth}
\centering\exedout
\caption{first figure}
\end{minipage}
\begin{minipage}{0.45\textwidth}
\centering\exedout
\caption{second figure}
\end{minipage}
\end{figure}

\lipsum

\end{document}


I was surprised to discover two \captions in the same figure environment actually work as desired.

-
This is what I ended up with. It appears that the actual semantics of figure is: "Everything with a caption in this environment is a figure, and it all floats together". – Little Bobby Tables Nov 23 '10 at 9:09
I normally put a \hfill between the minipages to spread them evenly over the text width. – Martin Scharrer Apr 28 '11 at 17:49

Since your figures shall be side by side, they are not expected to float independently. So you need just one figure environment for both objects.

Within this figure environment, you may use minipages (like Matthew already suggested). Some additions:

• minipages understand optional alignment parameters to align at top, bottom or center.
• For adding a caption to the minipages, I recommend to use the subcaption package. It is part of the feature-rich caption package.

Nevertheless you could check out the subfig package. That task could be handled like subfigures even if you customize the captions such that they look like two independent figures.

-