Fixed column-width table with text left-aligned in cells
You could use the array
package and let it insert \raggedright
commands. A comfortable way is to define a new column type:
\usepackage{array}
\newcolumntype{P}[1]{>{\raggedright\arraybackslash}p{#1}}
Now just use P
instead of p
to get left justified p columns.
Instead of \raggedright
, you could also use the enhanced command \RaggedRight
of the ragged2e
package, which allows hyphenation. Further \arraybackslash
, which restores the behavior of \ (changed by \raggedright
), is no longer needed.
So, my preferred way would be
\usepackage{array}
\usepackage{ragged2e}
\newcolumntype{P}[1]{>{\RaggedRight\hspace{0pt}}p{#1}}
I'm further inserting \hspace{0pt}
because otherwise there could be hyphenation problems: TeX doesn't hyphenate the first word in a box. Inserting zero space works around that.