Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have inserted 2 figures into my Latex document as a table, using a mini page, so that they are next to each other. When i turn it into a PDF document, the figures overlap. I would like to be able to create a "space" between the 2 figures so that they are a bit more apart. I think I am supposed to change the table format but i'm not sure how. Here is the code:

  \begin{figure}
\centering
\begin{tabular}{cc}
\begin{minipage}{190pt}
{\includegraphics[width=220pt]{depth3.pdf}}
\caption{figure1}
\label{fig:1}
\end{minipage}
&
\begin{minipage}{190pt}
{\includegraphics[width=220pt]{depth4.pdf}}
\caption{figure2}
\label{fig:2}
\end{minipage}
\end{tabular}
\end{figure}
share|improve this question

migrated from stackoverflow.com Mar 27 '12 at 15:51

This question came from our site for professional and enthusiast programmers.

    
Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. –  Werner Apr 24 '12 at 19:29

1 Answer 1

up vote 1 down vote accepted

In your code the size of each minipage is given by the 190pt, and the graphics width is 220pt. The alignment of each minipage within the table is given by the cc (which means center center---i.e. center each column).

By adjusting these parameters you should be able to get the spacing you want. It might help to use the size \textwidth, i.e.

\begin{minipage}{0.4\textwidth}
  \includegraphics[width=0.4\textwidth]{depth4.pdf}
  \caption{figure2}
  \label{fig:2}
\end{minipage}
\end{tabular}
\end{figure}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.