# Wrapping a table in two column text

I have a two column text and would like to wrap it around a table, yet in such a way that the table spans over both columns. Ideally the text in left column would continue on the left below the table and vice versa for the text in the right column. Small example:

\documentclass[english]{paper}

\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{babel}
\usepackage{geometry}
\usepackage{array}
\usepackage{float}
\usepackage{amsmath}
\usepackage{color}
\usepackage{colortbl}
\usepackage{multirow}
\usepackage{lipsum}
\usepackage{multicol}
\usepackage{wrapfig}

\makeatletter

\providecommand{\tabularnewline}{\\}

\floatstyle{ruled}

\definecolor{Gray}{gray}{0.9}

\makeatother

\begin{document}

\begin{multicols}{2}

\lipsum[1-3]

\begin{wraptable}{o}{\textwidth}
\begin{tabular}{ccc|ccc|ccc}  \multicolumn{3}{c|}{kappa 1} & \multicolumn{3}{c|}{kappa 2} & \multicolumn{3}{c}{kappa 3}\tabularnewline
\hline
coverage & MSD$^*$ & MSE$^{**}$ & coverage & MSD & MSE & coverage & MSD & MSE\tabularnewline
\hline
\rowcolor{Gray}
0.96 & 0.068 & 1.005 & 0.98 & 0.283 & 1.097 & - & - & -\tabularnewline
0.98 & 0.007 & 0.008 & 0.96 & 0.446 & 1.551 & - & - & -\tabularnewline
\rowcolor{Gray}
0.96 & 0.010 & 0.009 & 0.96 & -0.007 & 2.435 & 0.95 & 0.017 & 0.026\tabularnewline
\end{tabular}
\caption{table}
\end{wraptable}

\lipsum[4-5]

\end{multicols}
\end{document}

-
According to the multicol documentation this is not possible: floats never show up on the same page on they are defined, and will show at the top/bottom of the following page. Perhaps flowfram package is too big a weapon for such task? –  guillem Nov 8 '12 at 14:51
A possible solution would be to close and then re-open the multicol env: \end{multicols} \begin{table} (...) \end{table} \begin{multicols}{2} yet then the text continues on the leftmost column, instead of below the float... –  fbielejec Nov 8 '12 at 15:15
The text flow that you want can be achieved using the flowfram package (theoretically!), but I'm affraid that with multicol package is not possible. Some skilled multicol user may prove me wrong, though. –  guillem Nov 8 '12 at 15:47

The following code will only solve part of your problem. Using the table* environment you can simply place floating tables, which will prevent the table from being partially overwritten as it happens in your example. Also the table can span over the whole textwidth. The remaining problem is the wrapping.

This solution works also with other classes and more columns. I shortend your preamble to a minimum.

Code

\documentclass{paper}

\usepackage{geometry,multicol,lipsum}

\usepackage{color,colortbl}
\definecolor{Gray}{gray}{0.9}

\begin{document}
\begin{multicols}{2}
\lipsum[1-5]

\begin{table*}
\centering
\begin{tabular}{ccc|ccc|ccc}
\multicolumn{3}{c|}{kappa 1} & \multicolumn{3}{c|}{kappa 2} & \multicolumn{3}{c} {kappa 3} \\
\hline
coverage & MSD$^*$ & MSE$^{**}$ & coverage & MSD & MSE & coverage & MSD & MSE \\
\hline
\rowcolor{Gray}
0.96 & 0.068 & 1.005 & 0.98 & 0.283 & 1.097 & - & - & - \\
0.98 & 0.007 & 0.008 & 0.96 & 0.446 & 1.551 & - & - & - \\
\rowcolor{Gray}
0.96 & 0.010 & 0.009 & 0.96 & -0.007 & 2.435 & 0.95 & 0.017 & 0.026 \\
\end{tabular}
\caption{table}
\end{table*}

\lipsum[5-10]
\end{multicols}
\end{document}


Result

-