0

Consider this example:

\documentclass{report}
\begin{document}
\begin{tabular}{p{3cm}c}
  A0 &  A1\\
  BBB00 &   BBB111
\end{tabular}
\end{document}

The output is

enter image description here

Using p{3cm} allowed me to specify the column width, but chose left alignment by default. How can I additionally control also the alignment of the first column (e.g. centred)?

1
  • Load array and use >{\centering}p{3cm}
    – Bernard
    May 3 '20 at 21:06
2

p is justified rather than left aligned, Assuming you have the array package loaded you could use

>{\centering\arraybackslash}p{3cm}

to get a ragged right p box, but for data tables you don't really want a p column with aligned paragraphs so with current array package you can use

wc{3cm}

for a 3cm wide c column.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.