[Tex/LaTex] Table spanning two columns creates hole in text

tablestwo-column

I am writing an article in two columns:

\documentclass[a4paper,11pt,twocolumn]{jarticle}

And at one point I include a table spanning 2 columns.

text before table

\begin{center}
\begin{table*}[ht]
...
\end{table*}
\end{center}

text after table

The table is placed at the top of the following page. This is fine.

What troubles me, that there are approximately 3 white lines between
text before table and text after table

Please, how can I remove this white space?

Best Answer

If one encases a "floating object" (such as LaTeX table, table*, and figure objects) in a \begin{center} ... \end{center} construct, quite a bit of whitespace is inserted above and below the object. This may be desirable for other uses of the center environment, but not for the floats Instead, insert the command \centering immediately after the \begin{table*} instruction. The \centering command acts like a switch that's in effect until the end of the current environment is encountered (in the present case, a table* environment). That way, the contents of the table* environment will be horizontally centered, but without any extra vertical whitespace being inserted as well.

Hence, you may want to structure your code along the following lines:

\documentclass[a4paper,11pt,twocolumn]{jarticle}
\begin{document}

text before table

\begin{table*} % no need to specify "[ht]"
\centering
...
\end{table*}


text after table
\end{document}