Graphics, Figures & TablesTwo Figures in one Row (no sub-figure)

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
nicoo
Posts: 4
Joined: Thu Jul 28, 2011 6:22 pm

Two Figures in one Row (no sub-figure)

Post by nicoo »

Hi all!

Here is my problem: I would like to put 2 figures on the same row but i don't want them to be merged in one figure or to be subfigures. I want them to be two different figures automatically numbered by latex. It seems much harder than expected.

Any idea?

Thanks: ;-)
Last edited by nicoo on Fri Jul 29, 2011 9:30 am, edited 1 time in total.

Recommended reading 2024:

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

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Two Figures in one Row (no sub-figure)

Post by localghost »

You can put several figures into one single float environment without problems. But you need to embed them in a minipage environment. Its best illustrated with an example.

Code: Select all

\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{caption}
\captionsetup{%
  font=small,
  labelfont=bf,
  tableposition=top
}

\begin{document}
  \begin{figure}[!ht]
    \begin{minipage}{0.49\linewidth}
      \rule{\linewidth}{0.5\linewidth}  % Only a dummy
      \caption{Figure on left side}\label{fig:left}
    \end{minipage}
    \hfill
    \begin{minipage}{0.49\linewidth}
      \rule{\linewidth}{0.5\linewidth}  % Only a dummy
      \caption{Figure on right side}\label{fig:right}
    \end{minipage}
  \end{figure}
\end{document}
The (optional) caption package allows to customize the captions of those floats. It is not part of the solution.


Best regards and welcome to the board
Thorsten
nicoo
Posts: 4
Joined: Thu Jul 28, 2011 6:22 pm

Re: Two Figures in one Row (no sub-figure)

Post by nicoo »

great it's working!

thank you!!
Post Reply