# Tabularx “auto” width?

I would like to create a table whose width should be the minimum possible (lines don't wrap). I see that tabularx wants a width parameter, is it possible to specify something like "auto", instead, for example, of \linewidth?

-
that is done by a simple tabular environment – Herbert Sep 11 '12 at 13:42
@Herbert I guess that should be made the answer:-) – David Carlisle Dec 13 '12 at 0:18

\begin{tabular}{l r c}
foo & bar & and so on
\end{tabular}


is a tabular with a minimum width and default column separation width

\begin{tabular}{@{} l r c @{}}
foo & bar & and so on
\end{tabular}


is a tabular with no column separation on the left and right

{\setlength\tabcolsep{0pt}%
\begin{tabular}{l r c}
foo & bar & and so on
\end{tabular}}


is a tabular with no column separation anyway

\begin{tabular}{l @{} r c }
foo & bar & and so on
\end{tabular}


is a tabular with no column separation between the first and second column

\begin{tabular}{l @{\hspace{5mm}} r c }
foo & bar & and so on
\end{tabular}


is a tabular with a column separation of 5mm between the first and second column

-