Using minipage to display two figures/table side-by-side in Latex

In the following example, ‘figure1’ and ‘figure2’ are being displayed side-by-side. One can also specify not only tables but also any other environment inside the minipage.

\begin{figure}[h!]
\begin{minipage}[b]{0.4\linewidth}
    \includegraphics{img/figure1}
    \caption{Figure 1}
\end{minipage}
\begin{minipage}[b]{0.4\linewidth}
    \includegraphics{img/figure2}
    \caption{Figure 2}
\end{minipage}
\end{figure}

One observation though: Do not skip a line between minipages. Otherwise, it will place the figures one below the other.

Reference
[1] http://www.latex-community.org/forum/viewtopic.php?f=5&p=5408

Advertisements

3 thoughts on “Using minipage to display two figures/table side-by-side in Latex”

  1. I have been browsing online more than 4 hours today, yet
    I never found any interesting article like yours. It’s pretty worth enough for me. In my view, if all site owners and bloggers made good content as you did, the internet will be a lot more useful than ever before.

  2. Thanks for the observation “Do not skip a line between minipages. Otherwise, it will place the figures one below the other.”. I just lost some hours to try figuring why the side by side figures did not work with me.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

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

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s