How can I center the column values in this code?
\documentclass[conference]{IEEEtran}
\begin{document}
\begin{table}
\centering
\begin{tabular}{|p{2.5cm}|p{2.5cm}|p{2.5cm}|}
\hline
Reconstruction strategy & aa & bb( \%) \\ \hline
Classic & 3342 voxels & 68 \% \\ \hline
VC & 4296 voxels & 87 \% \\ \hline
V m=7 & 4745 voxels & 96 \% \\ \hline
\end{tabular}
\newline\newline
\caption{title}\label{tab1}
\end{table}
\end{document}
Best Answer
You have to load the package
array
, define a new column type with horizontal centeringand use this one (
P
) instead ofp
Output:
If you also want vertical centering, use
m
instead ofp
:Output: