Graphics, Figures & TablesMultiple figures

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
kotoko
Posts: 12
Joined: Sat Jan 09, 2010 8:33 pm

Multiple figures

Post by kotoko »

Hello!

Does anybody know how to have several figures side by side with separated captions? (something like this http://en.wikibooks.org/wiki/LaTeX/Floa ... #Subfloats)

The solution in the wikibook is not working for me because if I use the package subfig a lot of references stop working.

Using a figure float with a table inside is not good either because I need separated caption (at least I don't know how to put separated captions inside a table).

Anybody knows a work around?

Thanks in advance

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Multiple figures

Post by gmedina »

Hi,

try the subcaption package.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
kotoko
Posts: 12
Joined: Sat Jan 09, 2010 8:33 pm

Re: Multiple figures

Post by kotoko »

You mean with the solution of a figure float with a table inside?

It turns out that the resulting layout is much worse with the table :shock:

Is there no equivalent of the subfig package?
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Multiple figures

Post by gmedina »

kotoko wrote:You mean with the solution of a figure float with a table inside?

It turns out that the resulting layout is much worse with the table ...
I don't know nothing about a table... where did you get the idea of a table from? You can use the subcaption package as the following example suggests:

Code: Select all

\documentclass[12pt]{article}
\usepackage{caption}
\usepackage{subcaption}

\begin{document}

\begin{figure}
  \centering
  \begin{subfigure}[b]{.3\linewidth}
    \centering
    \rule{3cm}{3cm}
    \caption{First subfigure}\label{fig:suba}
  \end{subfigure}%
  \begin{subfigure}[b]{.3\linewidth}
    \centering
    \rule{3cm}{3cm}
    \caption{Second subfigure}\label{fig:subb}
  \end{subfigure}
  \begin{subfigure}[b]{.3\linewidth}
    \centering
    \rule{3cm}{3cm}
    \caption{Third subfigure}\label{fig:subc}
  \end{subfigure}
  \caption{A figure with three subfigures}\label{fig:test figure}
\end{figure}

\end{document}
I used black rectangles in my example to simulate actual figures, but (once you have loaded the graphicx package) you can use the standard \includegraphics command.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply