# [texhax] difference between tabular* and tabularx?

Uwe Lück uwe.lueck at web.de
Fri Apr 14 23:55:38 CEST 2006

At 01:07 14.04.06, Lars Madsen wrote:
>Uwe Lück :
>>At 22:19 13.04.06, Paul Tremblay wrote:
>>>Could someone explain the major differences between the tabular and
>>>tabularx environments? I looked at the documentation for the memoir
>>>class, but the examples and results seem so similar that I don't know
>>>why I shouldn't just always use \tabular and \tabular*.
>>
>>I wouldn't have expected that the memoir documentation documents
>>tabular, tabular*, tabularx
>>[snip]
>>
>>In the first edition of the LaTeX companion (of which I have a copy),
>>there is indeed some subsection comparing tabularx and tabular*.
>>[snip]
>
>the memoir manual actually shows the differences between tabular, tabular*
>and tabularx, see memman page 165-168 (and memoir includes the code needed
>for tabularx, it doesn't load the tabularx package)

oh, sorry/funny ... (good that a human[e] memman reads and responses here).

Now I even have tested the UK FAQ:
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=fixwidtab
(You can search and google this FAQ, I just tried "tabularx".)
It even describes a refinement of tabularx --
all of this in a few lines, not several pages.

And now let's be a little nicer -- the main difference is:
******************************************************************************
to get a given table width, tabularx leaves this intercolumn
columns for same purpose.
******************************************************************************
(Other differences, as listed in Companion -- 1st ed. -- matter only
in extreme situations. -- The first sentence of the FAQ on this is
even shorter, perhaps more elegant.)

I admit that the /examples/ in the Companion (and maybe elsewhere)
don't make this so clear -- because their X columns are so narrow
and their cells have so little text, and therefore they use a
\raggedright variant (otherwise first lines of multi-lined X cells get
very "underful"). The difference rather becomes clear (and
tabularx useful[?]) when there are at most two X columns, other
columns being very narrow, and the X cells really have some lines
of text. As better examples, I had a few {description}-like (glossary-like)
applications where keywords or abbreviations (of varying width)
were in the left column (just "l" [l] type) with long-winded
explanations of at least two lines (almost) each (in the corresponding
right-hand cells).
-- However, the Companion (1st ed.) suggests quite a few variants
of list ({discription}) environments that might be better than such
a tabularx environment for the same purpose.

Anyway, I think, one should not leave tabular for something else as
for saving lines ... otherwise, just take the most narrow tables (...
roughly).
-- And tabular* doesn't save lines (!).

All the best,
Uwe.

P.S. 1: I am somewhat sorry for my reference to the LaTeX
Companion (1st ed.) for another reason: I used tabularx
some weeks ago, but found myself unable to recall how
`X'  works in tabularx from that Companion edition half an
hour ago (until my own memory helped me again).
-- In some sections it seems to have been meant to be
nothing but a /supplement/ to other documentation already
existing.

P.S. 2: FAQ indeed -- !!! Bravely skip the first sections on
"How to pronounce TeX" etc. on the main page, and then
you will find many links to subsections that you have been
wanted to know for long ... e.g. symbols ... (and wouldn't