I am creating a table where some cells would contain very long text. For these cases, I want the content of this cell to take up multiple lines. With the default implementation, after building , I see that the contents are truncated. Clearly this isn't what I would like to achieve.
Please find the code below. As you can see, some of the entries for second column is quite big to fit in one row. This is also causing the third column to never appear on PDF file.
\documentclass[twoside,11pt]{article}
\begin{document}
\begin{table}[ht]
\caption{Categories and example of attributes}
\label{atts}
\centering
\begin{tabular}{l l p{8.0cm} l}
\hline
Variable & Items & Category \\
\hline
Built-up area & Inside built-up area; outside built-up area & !!!CAT!!! \\
Type of road & Highway; district or province road & !!!CAT!!! \\
Type of road lanes & Road with one road lane; road with separated road lanes & !!!CAT!!! \\
Intersection & Near intersection; outside intersection & !!!CAT!!! \\
Location characteristic & Road works; bridge; tunnel; railroad; roundabout & !!!CAT!!! \\
Road factors & Bad road surface; faulty signals; faulty lighting; road works; queue; downhill; curve; bad visibility & !!!CAT!!! \\
Miscellaneous & Accident following accident; aquaplaning; sun blinded; school; recreation centre; bus stop; person swung out of vehicle; no safety belt; no helmet; no child seat; cargo on roadway before accident; cargo on roadway because of accident; fire after accident; comments & !!!CAT!!! \\
Total number of deaths & 0; 1; 2; 3; 4; 5 & !!!CAT!!! \\ [1ex]
\hline
\end{tabular}
\end{table}
~\ref{atts} is bad.
\end{document}

p{<length>}column type. If that does not solve your problem, please composed a fully compilable MWE including\documentclassand the appropriate packages that illustrates the problem. – Peter Grill Dec 02 '12 at 08:00\begin{tabular}{l p{4.0cm}}. This will make this column be similar to a\parbox{}, which can have multiple line and wrap. The4.0cmspecifies the width of the column. – Peter Grill Dec 02 '12 at 08:15begin{tabular}{l p{8.0cm} l}. – Peter Grill Dec 02 '12 at 08:30