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 have a tabular environment nested within a table environment which I'd like to place horizontally centered. What's the best way to achieve this?

If the right thing to do is use the \centering command, should \centering enclose the table or just the tablular environment?

share|improve this question
add comment

1 Answer

up vote 7 down vote accepted

I think you should use \centering within the table environment for best results.

\begin{table}
\centering
\begin{tabular}
\end{tabular}
\end{table}
share|improve this answer
    
Can you explain why this is preferable over centering the table environment? –  Isaac Kleinman Feb 19 '12 at 21:29
2  
The center environment adds unwanted vertical space. –  egreg Feb 19 '12 at 21:37
    
My question is about centering the tabular versus the table. –  Isaac Kleinman Feb 19 '12 at 21:58
    
@IsaacKleinman If you'd like to centre the whole table environment you'd have to use \begin{center} \end{center} environment, which is why egreg said that. –  Ayman Elmasry Feb 20 '12 at 7:22
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.