[Tugindia] Text wrapping in table

Radhakrishnan CV cvr at river-valley.org
Tue Jun 28 11:42:33 CEST 2011


On Tue, Jun 28, 2011 at 3:13 PM, Kannan Moudgalya <kannan at iitb.ac.in> wrote:
>
> Manjusha Joshi wrote:
>>
>> \begin{tabular}{|p{2cm}|}
>>  Aerospace \\ Engineering
>> \end{tabular}
>> is working.
>>
>> If want to add more columns, accordingly width of the words adjust width
>> of
>> the column.
>> Please send brief code  that will help to understand the problem.
>> Best wishes,
>
> 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?
>
> Kannan
>
> \begin{tabular}{|c|p{2cm}|r|} \hline
> Test & Aerospace \\ Engineering & Blank \\ \hline
> \end{tabular}

The carriage return (\\) in 'Aerospace \\ Engineering' shall be
replaced with \newline as in:

 Test & Aerospace \newline Engineering & Blank \\ \hline

If not LaTeX will think that the row ends at that point.

Best regards
-- 
Radhakrishnan



More information about the tugindia mailing list