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 a row containing three images. How do I add another row of images below the existing one? This is my code

\begin{figure}
  \centering
  \subfloat[A gull]{\label{fig:gull}\includegraphics[width=0.3\textwidth]{gull}}                
  \subfloat[A tiger]{\label{fig:tiger}\includegraphics[width=0.3\textwidth]{tiger}}
  \subfloat[A mouse]{\label{fig:mouse}\includegraphics[width=0.3\textwidth]{mouse}}
  \caption{Pictures of animals}
  \label{fig:animals}
\end{figure}
share|improve this question
2  
Just leave a blank line, and add your next three \subfloats. –  Jake Feb 4 '12 at 3:43
    
This might be a helpful explanation: diagrams side by side –  Peter Grill Feb 4 '12 at 3:49

1 Answer 1

up vote 2 down vote accepted

The contents within a figure environment is treated like any part of the document in terms of typesetting (apart from some length changes). So, you can insert a paragraph break after the first three, which will insert a paragraph break between the image sets. If you want a larger gap, you can insert more vertical space.

Here is a mock-up of what you're after:

\begin{figure}
  \centering

  \hspace*{\fill}
  \subfloat[A gull]{\label{fig:gull}\includegraphics[width=0.3\textwidth]{gull}} \hfill
  \subfloat[A tiger]{\label{fig:tiger}\includegraphics[width=0.3\textwidth]{tiger}} \hfill
  \subfloat[A mouse]{\label{fig:mouse}\includegraphics[width=0.3\textwidth]{mouse}}
  \hspace*{\fill}

  \bigskip% or \medskip or \smallskip or \vspace{<len>}

  \hspace*{\fill}
  \subfloat[An elephant]{\label{fig:elephant}\includegraphics[width=0.3\textwidth]{elephant}} \hfill
  \subfloat[A leopard]{\label{fig:leopard}\includegraphics[width=0.3\textwidth]{leopard}} \hfill
  \subfloat[A sloth]{\label{fig:sloth}\includegraphics[width=0.3\textwidth]{sloth}}
  \hspace*{\fill}
  \caption{Pictures of animals}
  \label{fig:animals}
\end{figure}

I've inserted \bigskip, although the other listed vertical gap measures would also allow you to tweak the distance.

Using \hspace*{\fill}...\hfill...\hfill...\hspace*{\fill} allows one to distribute the images equally across the text block width. At the moment, you're only occupying 90% of \textwidth (3 images of width .3\textwidth). The aforementioned technique inserts 10% of \textwidth evenly distributed in the 4 spaces around the 3 images. Perhaps you're interested in that, perhaps not.

Note that it is better to put the elephant as far away from the mouse as possible...

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.