[texhax] difference between tabular* and tabularx?

Uwe Lück uwe.lueck at web.de
Mon Apr 17 14:15:21 CEST 2006


At 20:41 15.04.06, Paul Tremblay wrote:
>On Fri, Apr 14, 2006 at 11:55:38PM +0200, Uwe Lück wrote:
> > 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 (!).
>
>I'm lost here. What do  you mean save lines and not save lines?

Sorry, my English may have been insuffienct here.

Suppose you think of a 2 by 2 table, each cell consisting of
six words of approximately equal length. Suppose with certain
parameters for tabular with two `p' columns, you get

        Aaa1 Aaa2    Bbb1 Bbb2
        Aaa3 Aaa4    Bbb3 Bbb4
        Aaa5 Aaa6    Bbb5 Bbb6

        Ccc1 Ccc2    Ddd1 Ddd2
        Ccc3 Ccc4    Ddd2 Ddd3
        Ccc5 Ccc6    Ddd4 Ddd5

With a larger sum width and with tabular*, you may get

   Aaa1 Aaa2              Bbb1 Bbb2
   Aaa3 Aaa4              Bbb3 Bbb4
   Aaa5 Aaa6              Bbb5 Bbb6

   Ccc1 Ccc2              Ddd1 Ddd2
   Ccc3 Ccc4              Ddd2 Ddd3
   Ccc5 Ccc6              Ddd4 Ddd5

instead. So the cells have been typeset exactly as before;
only the space between the columns -- or the placement of
the cells -- has changed. --
Now when you replace tabular* by tabularx with the same
sum width and `X' in place of the `p' columns, you get

   Aaa1 Aaa2 Aaa3    Bbb1 Bbb2 Bbb3
   Aaa4 Aaa5 Aaa6    Bbb4 Bbb5 Bbb6

   Ccc1 Ccc2 Ccc3    Ddd1 Ddd2 Ddd3
   Ccc4 Ccc5 Ccc6    Ddd4 Ddd5 Ddd6

(I have aimed at a center after 18 equal-width letters.
  I hope very much that you see this with your E-Mail program,
  while I have tried my one with Courier instead of Arial the
  first time in my life.)
-- So you need two lines less then with tabular*
-- i.e., as I meant, you "save 2 lines".

HTH -- Uwe.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/texhax/attachments/20060417/ed8efbda/attachment.htm


More information about the texhax mailing list