Right now I'm using the following tabular environment (which I got from here) so that the compactitem inside the table looks good.

\begin{tabular}{@{}l p{10cm}}
  blub & \textbf{longer longer longer text}

But a little below this table and below another headline, I want to use the same kind of tabular environment again. If I naively just do this, of course it won't have the same column widths as the first table, since the widest text in the first column seems to determine its width. How can I make it so that the second tabular environment copies the width ratio from the first one, if there is any way at all?

  • 1
    Use p{<length>} also for the first column. – egreg Oct 10 '13 at 13:22
  • @egreg: Hum, so is there a way to figure out the width the first column in my document currently has? Since I want the second tabular to copy the width of the first one, but not necessarily by changing the width of the first table and then using the same value. – InvisiblePanda Oct 10 '13 at 13:25
  • What if the second table has items wider than those in the first table? – egreg Oct 10 '13 at 13:27
  • @egreg: They are strictly smaller by the nature of these two tables ;-) But I guess I'm just going to measure the widths of the first table and then set this specific value. Thanks! – InvisiblePanda Oct 10 '13 at 13:29
  • The eqparbox package may be relevant here. – user4686 Oct 10 '13 at 13:52

Here's a trick for this particular case:


\def\zz{some text }\def\zzz{\zz\zz\zz\zz\zz}

something & \zzz \\
else & \zzz


what  & \zzz \\
is    & \zzz \\
this? & \zzz


Once you have set a two column rtabular environment, the width of its first column is available in the parameter \nexttablewd.

This is obtained by building the first table in a protected environment, then dismantling its last row and getting the width of the first box in it. It could be generalized to tables with more columns.

enter image description here

| improve this answer | |
  • 1
    The eqparbox package may be relevant here – user4686 Oct 10 '13 at 13:53

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.