GeneralImages side to side

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
pedrovg2
Posts: 4
Joined: Thu Mar 27, 2008 4:03 am

Images side to side

Post by pedrovg2 »

I want to put two imagem side to side. How can I do this?


Thanks

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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

Images side to side

Post by gmedina »

If they are independent figures, you can use minipage environments. If they are subfigures, use the subfig package.

A little example of the former situation:

Code: Select all

\documentclass{article}
\usepackage{caption}

\begin{document}

\noindent\begin{minipage}{.45\textwidth}
  \centering
  \rule{.7\linewidth}{1cm}
  \captionof{figure}{Test figure 1}
  \label{fig:testfig1}            
\end{minipage}
\begin{minipage}{.45\textwidth}
  \centering
  \rule{.7\linewidth}{1cm}
  \captionof{figure}{Test figure 2}
  \label{fig:testfig2}            
\end{minipage}

\end{document}
I used \rule commands only to simulate actual figures.
Last edited by gmedina on Thu May 08, 2008 5:23 pm, edited 1 time in total.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

Images side to side

Post by Stefan Kottwitz »

Hi pedrovg2,

perhaps see de-tex-faq 6.1.6 for an example. It's in german, but the tex code should be understanable.

Stefan
LaTeX.org admin
pedrovg2
Posts: 4
Joined: Thu Mar 27, 2008 4:03 am

Re: Images side to side

Post by pedrovg2 »

I don't solve this yet. I don't know where I have to give the arquive of the imagem, where i have to put pegend etc.

Thanks
User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

Images side to side

Post by Stefan Kottwitz »

Hi,

gmedina has given a complete example above.
Just replace \rule (simulating the image) by \includegraphics{imagename}.

Don't forget \usepackage{graphicx} in your preamble. You may have a look at the graphics guide page 9.

Stefan
LaTeX.org admin
Post Reply