# Indentation of a tabular inside tabularx

Inside a tabularx environment I nested a two column width tabular which doesn't fit into the space completely. There are indentations on each side. How can I remove them?

MWE:

\documentclass[12pt,a4paper]{article}
\usepackage{tabularx}
\usepackage[english]{babel}
\usepackage{blindtext}
\begin{document}
\begin{tabularx}{\linewidth}{c|X|X}
row & row & row\\ \hline
row & \multicolumn{2}{l|}{\noindent\begin{tabular}{>{\hsize=2\hsize}X}ROW:\\ \blindtext\\ \end{tabular}}\\
\end{tabularx}
\end{document}


• The distance comes from the \tabcolsep. It's added twice (from the outer and the inner table). Do you really need nested tables? – someonr Dec 8 '13 at 22:16

You're not taking into account the horizontal spacing buffering the cells.

Try something along these lines:

\documentclass[12pt,a4paper]{article}
\usepackage{tabularx}
\usepackage[english]{babel}
\usepackage{blindtext}
\begin{document}
\begin{tabularx}{\linewidth}{c|X|X}
row & row & row\\ \hline
row &
\multicolumn{2}{l|}{%%
\noindent
\begin{tabular}{@{}>{\hsize=\dimexpr2\hsize+4\tabcolsep\relax}X@{}}
ROW:      \\
\blindtext\\
\end{tabular}
}\\
\end{tabularx}
\end{document}


What I've done here is adjust the \hsize to take into account the \tabcolsep. Also, I've added @{} to remove such extra padding around the inner most tabular environment.

Though what follows is most likely not at all what you want, I hope it illustrates a bit better the effect of @{} as I used it.

Leaving in the right most vertical line, I can better illustrate this use of @{} within the \multicolumn{2}{l@{}|} where the effect is

\documentclass[12pt,a4paper]{article}
\usepackage{tabularx}
\usepackage[english]{babel}
\usepackage{blindtext}
\begin{document}
\begin{tabularx}{\linewidth}{c|X|X}
row & row & row\\ \hline
row &
\multicolumn{2}{l@{}|}{%%
\noindent
\begin{tabular}{@{}>{\hsize=\dimexpr2\hsize+4\tabcolsep\relax}X@{}}
ROW:      \\
\blindtext\\
\end{tabular}
}\\
\end{tabularx}
\end{document}


After removing the last vertical line, the effect is as follows, which is perhaps what you were hoping for: