When I compile the following code, I get the error overfull hbox and I cannot see the right end of the table. Does anyone know how to fix it ?
\begin{center}
\begin{tabular*}{\textwidth}{c @{\extracolsep{\fill}} ccc}
\multicolumn{4}{c}{\textbf{Tolérances d'ajustement}} \\
\hline
Alésage & Arbre &Appariement & Raisons\\
\hline
Manivelle&Axe&&\\
Roulements&Axes& M7 - js5&Charges faibles et variables, petit diamètrem bague exterieure ne coulisse pas, logement en une pièce\\
Cloches&Roulements&H7 - p6&Transmission de petits couples sans sécurité supplémentaire\\
Bielle&Coussinet&H7 - p6&\\
Coussinet&Axes bielle &IT7 - f7&\\
Palier & Tourillon&H7-p6&\\
Palier&Maneton&H7 - p6&\\
Plateau&pales & H8 - h7& Jeu pour colle\\
Pied helice&Fixation helice&H7 - js6& incertain\\
Opercule& Axe bielle& H7 - k6& incertain \\
Palier & Goupille &M6 - m6& serrage leger\\
Engrenages&Axes&H7 - p6&\\
\hline
\end{tabular*}
\end{center}
Best Answer
Material in a column of type
c
does not get line-broken automatically. Thus, even though you've set\textwidth
as the first argument of thetabular*
environment, there's no guarantee that the combined width of the four columns won't, in fact, exceed\textwidth
. That's what's happening in your code.Instead of using a
tabular*
environment, I suggest you use atabularx
environment, with an overall width of\textwidth
and with a modified form of theX
column type for the final column. The specific modification used in the code below typesets the column material ragged-right while still permitting hyphenation.Some additional suggestions:
Use the macros of the
booktabs
package -- specifically,\toprule
,\midrule
, and\bottomrule
-- instead of the basic\hline
instruction.Use
l
instead ofc
as the column type for the first three columns.Load the
caption
package and apply some extra mark-up to distinguish more clearly what the logical parts of the table are (caption vs. body).