[Tex/LaTex] Remove justification from a longtable?

horizontal alignmentlongtable

Using :

\documentclass[12pt,a4paper]{report}
\usepackage[lmargin=3.81cm,tmargin=2.54cm,rmargin=2.54cm,bmargin=2.52cm]{geometry}
\usepackage{longtable}

\begin{document}
\begin{longtable}{|p{0.15\textwidth}|p{0.2\textwidth}|p{0.35\textwidth}|p{0.2\textwidth}|}
  .
  .
  .
\end{longtable}
\end{document}

How do I remove justification from the table ? What about only the 4th column ?

Best Answer

add

\usepackage{array}

and replace

p{0.15\textwidth}

by

>{\raggedright\arraybackslash}p{0.15\textwidth}

in any columns where you want ragged text.

Related Question