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}
Best Answer
Centering in
tabular
is done with thec
column type. Them
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: