# Centering in tabular does not work

The following is a minimal example of a table I am defining. The first row ($v_1$ and $v_2$) are not centered, but the subsequent rows are. What am I doing wrong?

\documentclass{article}
\usepackage{array}

\begin{document}
\begin{tabular}{| m{1cm} | m{1cm} |}
\multicolumn{2}{c}{\footnotesize Subgraph Matches} \\ \hline
$v_{1}$ & $v_{2}$ \\ \hline
\{005\} & \{006\} \\ \hline
\{007\} & \{008\} \\ \hline
\end{tabular}
\end{document}
-

Centering in tabular is done with the c column type. The m column type is used for vertical centering, not horizontal centering which is what this table needs:

However, you should really consider the booktabs package which produces more professional looking tables:

## Code:

\documentclass{article}
\usepackage{array}
\usepackage{booktabs}

\begin{document}
\begin{tabular}{| c | c |}
\multicolumn{2}{c}{\footnotesize Subgraph Matches} \\ \hline
$v_{1}$ & $v_{2}$ \\ \hline
\{005\} & \{006\} \\ \hline
\{007\} & \{008\} \\ \hline
\end{tabular}

\bigskip\bigskip
\begin{tabular}{ c  c }
\multicolumn{2}{c}{\footnotesize Subgraph Matches} \\ \toprule
$v_{1}$ & $v_{2}$ \\ \cmidrule(lr){1-2}
\{005\} & \{006\} \\ %\cmidrule(lr){1-2}
\{007\} & \{008\} \\ \bottomrule
\end{tabular}
\end{document}
-
Arrghh, elementary Mr. Watson... Thanks much; I should just go to bed... –  ozsu Oct 6 '12 at 1:03