Re: Text wrapping in table

Kannan Moudgalya <kannan-dOeZK83GKW6f0DUV/[email protected]>
Newsgroups gmane.comp.tex.tugindia
Message-ID <[email protected]>
Asha G wrote:
> I am creating a table and want some of the text to go to another line within
> the same column eg - Aerospace Engineering to be Aerospace
>
> Engineering
>
> I have tried to give column dimension p{2cm}
> and also tried Aerospace \\ Engineering
>
> Nothing is working.
> Is there any package to be used for this ?
You may wish to try the tabularx package.  Given below is a sample code.

Kannan

\documentclass[12pt]{article}
\usepackage{tabularx}
\begin{document}
\begin{tabularx}{\linewidth}%
      {|>{\setlength{\hsize}{0.2\hsize}}X|%
        >{\setlength{\hsize}{2.0\hsize}}X|%
        >{\setlength{\hsize}{0.8\hsize}}X|} \hline
No. & What is to be done & Why it needs to be done \\ \hline
1. & Completion of civil work in the dining hall.  This includes
changing the windows. & \\ \hline
2. & Electrical work in the dining hall, TV and lounge areas,
including permanent speakers, mike systems, large screens and
dimmerstat.
& To make the halls multi-utility infrastructure. \\ \hline
\end{tabularx}
\end{document}

_______________________________________________
Home:        http://www.tug.org.in/
TeX FAQ:     http://www.tex.ac.uk/faq
unsubscribe: http://tug.org/mailman/listinfo/tugindia
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.