I am very very new to TeX/LaTeX, I am writing my first document. So far, I love the way it shows everything. The learning curve is steep though.

I have images that needs to be compared, so they must be close to each other. How can I achieve that?

In the image below, you can see an example of what I want (I know it is ugly, that is why I am using LaTeX ;) ). I used subfig package, but it's main purpose looks like to caption subfigures. I do not want to caption them separately, it would lead to information duplication. It does not need to be exactly like in the image, I am open to suggestions.

alt text

  • You will get better result if the images are vertically centered. – xport Dec 29 '10 at 16:44

If you simply want to reproduce a similar formatting, you can use the tabular environment to put the pictures in a table. This would look something like:

  & clown & goldhill256 & lighthouse \\ \hline
  Sobel & \includegraphics{image1} & \includegraphics{image2} & \includegraphics{image3} \\ \hline
  Sobel w/thresholding & ... & ... & ... \\ \hline
  Sobel w/thresholding \& thinning & ... & ... & ...

It appears as if this table is going to span the width of the page, however, so you may be better off using the tabularx package:

  & clown & goldhill256 & lighthouse \\ \hline
  Sobel & \includegraphics[width=\hsize]{image1} & \includegraphics[width=\hsize]{image2} & \includegraphics[width=\hsize]{image3} \\ \hline
  Sobel w/thresholding & ... & ... & ... \\ \hline
  Sobel w/thresholding \& thinning & ... & ... & ...

That should...

  1. cause the table to span the entire width of the page;
  2. typeset the leftmost column in a 1.5cm wide parbox (which will allow for line breaks); and
  3. auto-size the picture columns such that they are all the same width and take up the extra room in the page.
  • I get a "Missing number, treated as zero." error at the first line. Sorry I still don't know how to evaluate error messages properly. I think it needs another argument before p. – nimcap Dec 1 '10 at 15:37
  • Sorry about that; I added the missing text to the tabularx code. (I wrote it from memory and I just forgot the "{\hsize}" part.) – ESultanik Dec 1 '10 at 15:47

You could also use subfigures. See the tutorial below for an example:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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