Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
4  
Don't encase the table* environment in a \begin{center} ... \end{center} construct. Instead, insert the command \centering immediately after the \begin{table*} instruction. –  Mico Nov 16 '12 at 5:52
    
Thank you! This solves my problem! –  Martin Drozdik Nov 16 '12 at 5:57
    
OK, I'll re-post my comment as an answer. –  Mico Nov 16 '12 at 5:58
add comment

1 Answer

up vote 3 down vote accepted

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}
share|improve this answer
    
You can improve your answer by explaining why this solves the problem. –  Marc van Dongen Nov 16 '12 at 9:14
    
@MarcvanDongen - Thanks for the suggestion! I've updated my answer quite a bit. –  Mico Nov 16 '12 at 12:58
    
Thanks. I think this improves the answer for future generations.... –  Marc van Dongen Nov 16 '12 at 19:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.