# horizontally center table

Strangely in this MWE the table is shifted to the left but in my original document I have exactly the same code but the table is centered. Can anyone solve the mystery?

\documentclass{article}

\begin{document}

\begin{table}[H]
\caption{Robustness checks---Organised events}
\begin{tabular}{lc} \hline
VARIABLES & Org. event \\ \hline
&  \\
Price shock & -0.212 \\
& (0.177) \\
&  \\
Observations & 2,226 \\
Number of city\_group & 37 \\
R-squared & -0.021 \\ \hline
\multicolumn{2}{c}{ Robust standard errors in parentheses} \\
\multicolumn{2}{c}{ *** p$<$0.01, ** p$<$0.05, * p$<$0.1} \\
\end{tabular}
\end{table}

\end{document}

-
As far as why the table is centered in your original document, perhaps you are suing a solution similar to How can I center all tables in a document?, but without seeing the code it is difficult to know for sure. –  Peter Grill Jun 11 '12 at 6:38

Adding \centering after \begin{table} will center the table:

## Notes:

• The showframe package was used to add the margins so that the centering effect can be seen.
• Using centering is preferred over the center environment as the environment adds additional vertical space.

## Code:

\documentclass{article}
\usepackage{showframe}

\begin{document}
\begin{table}[H]
\centering
\caption{Robustness checks---Organised events}
\begin{tabular}{lc} \hline
VARIABLES & Org. event \\ \hline
&  \\
Price shock & -0.212 \\
& (0.177) \\
&  \\
Observations & 2,226 \\
Number of city\_group & 37 \\
R-squared & -0.021 \\ \hline
\multicolumn{2}{c}{ Robust standard errors in parentheses} \\
\multicolumn{2}{c}{ *** p$<$0.01, ** p$<$0.05, * p$<$0.1} \\
\end{tabular}
\end{table}
\end{document}

-
Thanks @PeterGrill, for now I'll use centering to solve this. In a rush for a deadline. I'll come back to this mystery a bit later. Cheers –  Abhimanyu Arora Jun 11 '12 at 7:13