[texhax] justify columns in longtable

E. Krishnan ekmath at asianetindia.com
Mon Feb 28 18:49:37 CET 2005


On Mon, 28 Feb 2005, Sarah Bluhme wrote:


> \begin{longtable}{|l|p{3cm}|}
>....................................... 
> How can I insert the \raggedright (or some other) command to 
> take effect over the whole column?


This is from the LaTeX Companion, Second Edition

\usepackage{array}

\begin{longtable}{|l|>{\raggedright}p{3cm}|}
  \hline
  x & this column contains a 
      long entry and so  
      looks better if set 
      ragged right   \tabularnewline
  y & and this again is 
      another column with
      a longish entry \tabularnewline
  \hline
\end{longtable}


-- 
Krishnan



More information about the texhax mailing list