\documentclass{article}
\usepackage{array}
\begin{document}
\begin{tabular}{| >{\centering}p{2.5cm} | >{\centering}p{0.5cm} | >{\centering}p{2.5cm} |>{\centering}p{2.5cm} |>{\centering}p{2.5cm} |>{\centering}p{2.5cm} |}
\hline
Abc & Bcd & A long cell with text that wraps around and is centered & long cell with text & AAAlong cell with text that wraps around and is centered & SSSlong cell with text that wraps around and is centered \\
1 & 3 & qw & qe & sad &11\\
\hline
\end{tabular}
\end{document}
Tell me more
×
TeX - LaTeX Stack Exchange is a question and answer site for
users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
|
|
||||
| show 1 more comment |
|
See the related answer to Center column with specifying width in table (tabular enviroment)? for advanced declarations which support line-breaks and hyphenation of the first word. |
|||||||||
|
\centeringinside table column definition results in error message")? – lockstep May 23 '11 at 16:40\\. – lockstep May 23 '11 at 16:43