One easy way to this would be to use the array
package, specifying your column width with m{...}
. For example:
\begin{tabular}{ m{4cm} m{1cm} }
... & ... \\end{tabular}
will give you a four centimeter-long column and a one centimeter-long column. In each cell, the contents will be vertically aligned to the center. Note, however, that the cell contents will be horizontally aligned left. If you also want to align all the cell contents toward the center in a horizontal sense, then you could do something like this:
\begin{tabular}{ >{\centering\arraybackslash} m{4cm} >{\centering\arraybackslash} m{4cm} }
... & ... \\end{tabular}
The point of \arraybackslash
is to return \\
to its original meaning because the \centering
command alters this and could possibly give you a noalign
error during compilation.
If you have several columns and do not want your source to look cluttered, you could define new columns before your tabular environment, for example:
\newcolumntype{C}{ >{\centering\arraybackslash} m{4cm} }
\newcolumntype{D}{ >{\centering\arraybackslash} m{1cm} }
\begin{tabular}{ C D }
... & ... \\end{tabular}
There is a lot of useful information on tables in the wiki LaTeX guide, if you want to explore this further.
p{...}
aligns the content toward the top,m{...}
aligns the content toward the center, whileb{...}
aligns it toward the bottom.p
specifier is standard.