[Tugindia] Text wrapping in table

E. Krishnan ekmath at asianetindia.com
Wed Jun 29 08:18:51 CEST 2011



On Tue, 28 Jun 2011, Kannan Moudgalya wrote:

> I am also interested in this usage, so tried out the following code, but it 
> is not doing what I thought I understood from the above.  I wanted three 
> columns in this Table, first column having Test, the second column Aerospace 
> Engineering and the third column, the word Blank.  Am I making a mistake?
>
> \begin{tabular}{|c|p{2cm}|r|} \hline
> Test & Aerospace \\ Engineering & Blank \\ \hline
> \end{tabular}


Please try either

   \begin{tabular}{|c|p{2cm}|r|}
     \hline
     Test & \raggedright Aerospace \\ Engineering & Blank\\
     \hline
   \end{tabular}


or


   \usepackage{array}

   \begin{tabular}{|c|>{\raggedright}p{2cm}|r|}
     \hline
     Test & Aerospace \\ Engineering & Blank\\
     \hline
   \end{tabular}







---
Krshnan


More information about the tugindia mailing list