[Tex/LaTex] Set multicolumn width to default table width

multicolumntables

I have a two column table with a single multicolumn spanning both of them. The text on that multicolumn is rather long so I need to set its width so it wraps around. I can set the width with \multicolumn{2}{p{whatever}}{text} but what should I set "whatever" to? What is the actual width of a table? Is there a variable holding that value?

I first thought to use \textwidth but that's not it. Building the document on draft mode shows that it's going out a tiny bit. The following table should show my problem. In draft mode will display a black box on its side.

\begin{tabular}{l l}
  \toprule
  \multicolumn{2}{p{\textwidth}}{\lipsum[1]} \\
  \bottomrule
\end{tabular}

I do have more rows, I'm just keeping the example simple. I'm using the memoir document class. The actual text inside the multicolumn is using the seqsplit package.

EDIT: I should have been more specific with the question. The only row that would make the table go over the limit is the one that I'm also trying to limit. And by limit I mean, so I don't get an overfull warning.

So my question can be better rephrased as how to find the available space for a table so it is not overfull?

Best Answer

The space available isp{\dimexpr\textwidth-2\tabcolsep\relax} due to the column padding LaTeX applies, assuming you have \noindent\begin{tabular} otherwise the table itself will be offset by \parindent.

However if the span is wider than the columns it spans, TeX puts all the extra width into the last column. If that is a problem, edit your example to be a complete (small) document that shows the problem.