TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have used \begin{tabularx} or \begin{tabular*} but neither of these two work, these two environment managed to increase the width of the table as the same as the text, while they cannot let the column contents inside the table increased associated with the table width.

share|improve this question
You query is somehow confusing: the title asks for tables with a given width, but the description of the problem mentions column width. Can you please describe clearly and in more detail your intent? – Gonzalo Medina Jun 8 '11 at 1:36

The tabular* environment is able only to act on the intercolumn space, while tabularx can decide the width of the columns via the column specifier X. If one uses the latter environment without X columns, no automatic enlargement will happen.

Suppose you have three columns, with the first listing the items, the second with descriptions and the third with comments; we want that the latter two enlarge proportionally to the desired table width


\begin{tabularx}{\textwidth}{l X X}
Item & Description & Comments \\
Item 1 & 
  this is the description of item 1 &
  these are the comments on item 1 \\
Item 2 & 
  this is the description of item 2 &
  these are the comments on item 2 \\

(I've used the rules provided by the booktabs package). Put the environment inside a table environment with \centering and you're done. It's also possible to have X columns of different width, a method is explained in the manual of tabularx. There's also the tabu package, that should be able to manage this kind of tables.

share|improve this answer

I assume you mean the \tabskip-glue (example in plain-format):

\halign{\tabskip1em plus .2\hsize#\hfil&#\hfil&\tabskip0pt #\hfil\cr
  A testing&table&with\cr Some&content&booyah\cr}
\halign to \hsize{\tabskip1em plus .2\hsize#\hfil&#\hfil&\tabskip0pt #\hfil\cr
  A testing&table&with\cr Some&content&booyah\cr}
\halign to .5\hsize{\tabskip1em plus .2\hsize#\hfil&#\hfil&\tabskip0pt #\hfil\cr
  A testing&table&with\cr Some&content&booyah\cr}


As you see, the only thing changing is the width of the \halign. The tabskip glues positive stretchability makes it possible for the columns to spread out to accommodate the available space.

share|improve this answer

Here is a simple way:

\setlength\q{\dimexpr .5\textwidth -2\tabcolsep}
alfa & bravo \\
charlie & delta
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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