Underfull \hbox (maldad 3148) en el párrafo

Underfull \hbox (maldad 3148) en el párrafo

Recibo el mensaje de advertencia

Underfull \hbox (badness 3148) in paragraph at lines xxx-xxx

Supongo que está relacionado con el espacio entre las palabras Sumas de cuadrados, pero no sé cómo solucionarlo. También tengo problemas con \hline al final de la tabla.

\documentclass[12pt, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

% Table preamble
\usepackage{array}
\usepackage{siunitx}

\begin{table}[ht]
    \centering
    \caption{ANOVA for the quadratic model for the retention factors of lycopene, beta-carotene and coenzyme Q10.}
    \vspace*{5mm}
    \label{Table2}
    \begin{tabular}{p{3.2cm}p{1.9cm}p{0.7cm}p{2.9cm}p{1.8cm}p{1.8cm}}
    \hline
    \textbf{Source} & \textbf{Sums of squares} & \textbf{DF} & \textbf{Mean square} & \textbf{F value} & \textbf{Prob$>$ F}\\
    \hline
    \multicolumn{6}{c}{\textbf{Lycopene}}\\
    \hline
    \textbf{Model} & \centering{0.46} & \centering{9}  & \centering{0.052} &\centering{329.29} & $<$ 0.0001\\
    \textbf{A-Pressure} & \centering{0.10} & \centering{1}  &\centering{0.10} & \centering{641.24} & $<$ 0.0001\\
    \textbf{B-Temperature} & \centering{0.012} & \centering{1}  &\centering{0.012} & \centering{75.20} & $<$ 0.0001\\
    \textbf{C-C$_{E}$} & \centering{0.32} & \centering{1}  &\centering{0.32} & \centering{2034.60} & $<$ 0.0001\\
    \textbf{AB} & \centering{0.011} & \centering{1}  &\centering{0.011} & \centering{72.08} & $<$ 0.0001\\
    \textbf{AC} & \centering{\num{6.9e-3}} & \centering{1} & \centering{\num{6.9e-3}} & \centering{43.94} & $<$ 0.0001\\
    \textbf{BC} & \centering{\num{2.9e-3}} & \centering{1} &\centering{\num{2.9e-3}} & \centering{18.34} & \centering{0.0020}\\ 
    \hline
    \end{tabular}
\end{table}

Respuesta1

Lo explotaría siunitxsin adivinar cuáles deberían ser los anchos de las columnas.

\documentclass[12pt, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage{array}
\usepackage{siunitx}
\usepackage{booktabs}

\newcommand{\splitcell}[1]{\begin{tabular}{@{}c@{}}#1\end{tabular}}

\begin{document}

\begin{table}[htp]
\centering

\caption{ANOVA for the quadratic model for the retention factors of 
  lycopene, beta-carotene and coenzyme Q10.}\label{Table2}

\medskip

\begin{tabular*}{\textwidth}{
  @{\extracolsep{\fill}}
  l
  S[table-format=1.3e-1,table-align-exponent=false]
  c
  S[table-format=1.3e-1,table-align-exponent=false]
  S[table-format=4.2]
  S[table-format=1.4,table-comparator]
  @{}
}
\toprule
Source & {\splitcell{Sums of \\ squares}} & {DF} &
 {\splitcell{Mean \\ square}} & {$F$ value} & {Prob $>F$}\\
\midrule
\multicolumn{6}{@{}c@{}}{\textit{Lycopene}}\\
\addlinespace
Model         & 0.46   & 9 & 0.052  &  329.29 & < 0.0001 \\
A-Pressure    & 0.10   & 1 & 0.10   &  641.24 & < 0.0001 \\
B-Temperature & 0.012  & 1 & 0.012  &   75.20 & < 0.0001 \\
C-C$_{E}$     & 0.32   & 1 & 0.32   & 2034.60 & < 0.0001 \\
AB            & 0.011  & 1 & 0.011  &   72.08 & < 0.0001 \\
AC            & 6.9e-3 & 1 & 6.9e-3 &   43.94 & < 0.0001 \\
BC            & 2.9e-3 & 1 & 2.9e-3 &   18.34 &   0.0020 \\
\bottomrule
\end{tabular*}

\end{table}

\end{document}

Eliminé todas las negritas, ya que no es realmente necesario: los encabezados ya tienen su protagonismo.

ingrese la descripción de la imagen aquí

Respuesta2

Sugiero este ligero ajuste al código (con una sugerencia de Sigur incorporada):

\documentclass[12pt, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

% Table preamble
\usepackage{array}
\usepackage{siunitx}
\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}

\begin{document}


\begin{table}[ht]
    \centering
    \caption{ANOVA for the quadratic model for the retention factors of lycopene, beta-carotene and coenzyme Q10.}
    \vspace*{5mm}
    \label{Table2}
    \begin{tabular}{m{3.2cm}M{1.9cm}M{0.65cm}M{2.2cm}M{1.35cm}M{1.86cm}}
    \hline
    \textbf{Source} & \textbf{Sums of squares} & \textbf{DF} & \textbf{Mean square} & \textbf{F value} & $\mathbf{Prob > F}$\\
    \hline
    \multicolumn{6}{c}{\textbf{Lycopene}}\\
    \hline
    \textbf{Model} & 0.46 & 9  & 0.052 & 329.29 & $<$ 0.0001\\
    \textbf{A-Pressure} & 0.10 & 1  &0.10 & 641.24 & $<$ 0.0001\\
    \textbf{B-Temperature} & 0.012 & 1  &0.012 & 75.20 & $<$ 0.0001\\
    \textbf{C-C$_{E}$} & 0.32 & 1  &0.32 & 2034.60 & $<$ 0.0001\\
    \textbf{AB} & 0.011 & 1  &0.011 & 72.08 & $<$ 0.0001\\
    \textbf{AC} & \num{6.9e-3} & 1 & \num{6.9e-3} & 43.94 & $<$ 0.0001\\
    \textbf{BC} & \num{2.9e-3} & 1 &\num{2.9e-3} & 18.34 & 0.0020\\ 
    \hline
    \end{tabular}
\end{table}

\end{document}

Todas las advertencias de exceso y falta de llenado han desaparecido. Además, \hlinese elimina un error en el último .

ingrese la descripción de la imagen aquí

Editar: código mejorado con un nuevo tipo de columna.

información relacionada