Display pictures side by side in LaTeX

Handling pictures in a LaTeX document sometimes makes much of confuses. This post will show you the ways to make pictures display side by side in a document.

Make use of minipage environment
This environment is used to split only a part of current page into several column with predefined width. If you want to place two pictures side by side, you just need to split your current page into 2 columns (also called subpage) and put your pictures here.

\begin{figure}[h!]
\begin{minipage}[b]{0.5\textwidth} %b means bottom,
%another options may be t (top), c (center)
\includegraphics[option]{img1.jpg}
\caption{The first image on the left}
\end{minipage}
\begin{minipage}[b]{0.5\textwidth}
\includegraphics[option]{img2.jpg}
\caption{The second image on the right}
\end{minipage}
\end{figure}

subfig package
subfig package provides you with the ability to have several subfigures within figure. In order to use this package, adding this line to your tex preamble:

\usepackage{subfig}

Here is the code for displaying three images side by side:

\begin{figure}
\centering
\subfloat[first picture caption]{\includegraphics[option]{img1}}
\subfloat[second picture caption]{\includegraphics[option]{img2}}
\subfloat[third picture caption]{\includegraphics[option]{img3}}
\end{figure}

That’s it. Hope you find something useful here. Any comments would be highly welcome and appreciated!

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s