# Table Spanning the Textwidth

I am trying to create a very simple, one row table that spans the linewidth. When I use the following command:

\begin{tabular*}{\linewidth}{l@{\extracolsep{\fill}}r} Entry 1 & Entry 2 \end{tabular*}

the first entry is slightly indented and the second entry entends past the linewidth. How do I make it so that the first entry is aligned with the left margin and the second entry is aligned with the right margin?

-
Why not just use \noindent Entry 1 \hfill Entry 2? – Werner Apr 11 '12 at 18:22
That is much simpler. I just didn't think of that. Thanks! – richtera Apr 11 '12 at 18:25
@Werner Indeed. Related question: tex.stackexchange.com/questions/6440/… – lockstep Apr 11 '12 at 18:29

Add \noindent before \begin{tabular*} if you use the tabular* environment outside a table float.

EDIT: As Werner points out, you may also remove the \tabcolsep before the first and after the last column (using @{}).

\documentclass{article}

\usepackage{lipsum}

\begin{document}

\lipsum[1]

\bigskip

\noindent
\begin{tabular*}{\linewidth}{@{}l@{\extracolsep{\fill}}r@{}}
Entry 1 & Entry 2
\end{tabular*}

\end{document}


-