# Control column width with left alignment in tabular

I want to make a table with a bigger than default column width for the first column. The text in this column should be left aligned. Here is my code.

\begin{tabular}{llll|l}
\end{tabular}


The first column (Address1, Address2) should have a larger width so that the second column (Mobile, Fax) is close to the right margin of the page. Now I just add in a lot of invisible columns so that there are more spaces between them. I wonder if there is a way to control the width of the first column.

-

There are quite a few ways to achieve your objective. One of them would be to use a tabular* environment instead of a tabular environment:

\begin{tabular*}{\textwidth}{l @{\extracolsep{\fill}} l}
\end{tabular*}


The somewhat intimidating-looking contruct @{\extracolsep{\fill}} serves to push the table's columns maximally far apart (while making the entire table still fit into a text block of width \textwidth).

-

Here's a quick-and-dirty solution with tabularx:

\usepackage{tabularx}
...
\begin{tabularx}{\textwidth}{X|l}
\end{tabularx}


But bear in mind that it's prettier without the vertical bar.

-
Note that doing this with tabularx rather than tabular* makes TeX work 10000000 times harder. It maybe that with today's machine speeds you don't care anymore, but.... –  David Carlisle Oct 1 '12 at 12:13
@DavidCarlisle : My guess was that OP might be a relative beginner; while I agree that my answer is not, technically, the best possible, I certainly think it's the least scary (for a beginner, anyway). –  Brent.Longborough Oct 1 '12 at 12:49
I get scared every time anyone uses tabularx –  David Carlisle Oct 1 '12 at 13:13

You can use the package tabu. You adjust the width of each column by changing the value 5 and 2.5 inside the brackets. You may also change the alignment from left to right or centred, by changing lto r(or c). Here is your table:

\documentclass{standalone}
\usepackage{tabu}
\begin{document}
\begin{tabu} to \linewidth {X[5,l]|X[2.5,l]}