[texhax] tables question

Philip Ratcliffe philip.ratcliffe at email.it
Wed Mar 16 23:39:08 CET 2005


> am using this code to make a table. It is show as a table but latex is
> not doing the line wrapping in a good way.  The line goes the end of the
> pages without ever line wrapping.
>
> \begin{table}[hang]
> \centering
> \caption{SIP Responses}
> \begin{tabular}{|l|l||}
>     \hline
> \textbf{\bf Class Code}  & {\bf Function}                \\
>     \hline \hline
> xx       &
> whatevenrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
> rrrrrrrrrrrrrrrrrrrrrrrrrr
>    \\
>
>     \hline
> \end{tabular}
> \label{tab:sip_responses}
> \end{table}
>
> any ideas on how to make it wrap?

TeX only knows how to hyphenate real (or approximately real) words, it has
absolutely no chance of knowing what to do with a huge string of r's.  Thus,
it does what is _always_ does in such cases: it leaves it all together
(while issuing an overfull hbox warning) so that the user can break it
according to whatever rules he/she may have.

Cordialmente,  Philip G. Ratcliffe

P.S.  Robin's suggestion doesn't really cure the problem either - i.e. it is
necessary but not sufficient, allowing a solution of the form:

\begin{tabular}{|l|p{4cm}||}
    \hline
\textbf{\bf Class Code}  & {\bf Function}                \\
    \hline \hline
xx       & whatevenrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrrrr
   \\

    \hline
\end{tabular}
_________________________________________

Professor of Nuclear & Subnuclear Physics
Dipartimento di Fisica e Matematica
Università degli Studi dell'Insubria
via Valleggio 11
22100 Como (CO)
Italy

Tel. +39 (031) 238.6231
Fax  +39 (031) 238.6119
Cell +39 (340) 2346580
Web  http://www.unico.it/~pgr

 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Manuali.net pensa alla tua formazione con corsi per tutte le professioni e dal costo contenuto. 
* Da Office alla Grafica, dal PC alla programmazione....Clicca qui
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2734&d=16-3



More information about the texhax mailing list