# Do not indent a tabular

In the following minimal example, the tabular seems to be indented, unless I misunderstand (for example, maybe left-aligned does not do what I think?)

\documentclass{article}

\begin{document}

\noindent Here is some text

\vspace{.2cm}

\noindent\begin{tabular}{ll}
text in row 1, col 1& text in row 1, col 2\tabularnewline
text in row 2, col 1& text in row 2, col 2
\end{tabular}

\noindent Some text afterward

\end{document}


produces the following output:

I have found the following related posts but the solutions do not work for me:

Little indentation despite \noindent after tabu custom-environment

LyX: Removing indentation from a table

Indentation after '\tabular' environments

I've tried to add \setlength{\parindent}{0pt} but that does not seem to make a difference.

This is as a result of the \tabcolsep space inserted around every column. Using a column specification with @{} will remove the column separation at that specific column:

\documentclass{article}

\begin{document}

\noindent Here is some text

\bigskip

\noindent\begin{tabular}{@{}ll}
text in row 1, col 1 & text in row 1, col 2 \\
text in row 2, col 1 & text in row 2, col 2
\end{tabular}

\bigskip

\noindent Some text afterward

\end{document}


As a discussionary reference, see Why is my tabular wider than the sum of its columns’ widths?.

• Thank you for your answer. As curiosity, why did you add the extra \bigskips? – Xu Wang Oct 8 '14 at 5:06
• @XuWang: I just wanted to separate the contents. – Werner Oct 8 '14 at 5:18