9

What is the difference between the tabular and the tabularx environements? Which one should I use for placing a row of pictures?

8

tabularx would give you nothing for images. What it does is try setting the text of each column to different widths so the line breaking changes to make the columns suitable width so that the table as a whole has a specified target width.

  • Generally I have been advised to nest tabular inside a table environment – Abhimanyu Arora Jun 8 '12 at 14:07
  • 3
    A table environment is a floating environment that lets LaTeX move it to a suitable page in the document so the surrounding text doesn't have to have a bad break. So normally it is used with caption and label so you can refer to it. That applies equally to tabular or tabularx, but if you are just using tabular to align a set of images figure environment might ne more suitable than table. – David Carlisle Jun 8 '12 at 14:18
  • 5
    @AbhimanyuArora In other words, you could say that a tabular (or tabularx, tabu etc.) is to a table what \includegraphics is to a figure: the former provides the content whereas the latter serves as a container for proper alignment (cf. also the Wikibook). – dgs Jun 8 '12 at 15:03

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.