I want to center my table in the middle of a two-column document in Latex. I have tried the {table*} and "\centering" command and it works, but not completely. It left aligns the table instead of centering it across the two columns. Here is my code. I would appreciate any tips on how to center this table properly.
\begin{table*}
\centering
\caption{Monte Carlo Simulation Results vs. Historical Food Distributions}
\label{table:DistributionComparison}
\begin{tabular}{@{}llllcll@{}}
\toprule
\multicolumn{2}{l}{Simulation} & \multicolumn{2}{l}{Historical} & Difference between means & & \\ \midrule
$M_1$ & $(SD_1)$ & $M_2$ & $(SD_2)$ & $M_1$ - $M_2$ {[}95\% CI{]} & $t(460)$ & $p$ \\ \midrule
146,797 & (3,786) & 122,468 & (27,411) & 24,330 {[}21,080, 27,578{]} & 14.7132 & \textless{}0.001 \\
\bottomrule
\end{tabular}
\begin{tablenotes}
\small
\item Note. $ N=462$. CI = Confidence Interval; $n_1 = 450$. $n_2 = 12$.
\end{tablenotes}
\end{table*}
Best Answer
You haven't provided the full code to compile and test so I am guessing the annotation are moved left because table itself should be centred.
First, the
table*
environment creates space of the full width but your table is is not that wide. I never usedtablesnotes
this way and I guess because it is not a part of the table, it is moved to the left margin with a small indentation astablesnotes
create a list.If you want annotation to be aligned with the table, remove
tablesnotes
and either insert one more row below\bottomrule
with all cells mergedor apply
threeparttable
as in the example below, which I would recommend