摆脱未满的坏盒子

摆脱未满的坏盒子
\begin{table}[h]
                \begin{center} 
                \renewcommand{\arraystretch}{1.5}
                \renewcommand{\tabcolsep}{0.2cm}
                \begin{tabular}{|c|c|c|c|}
    \hline
     **\multirow{3}*{{\bf Ingredients}} & \multicolumn{2}{|p{3cm}|}{{\bf Composition of each kg of feed (gram)}} & \multicolumn{1}{|p{3.5cm}|}{{\bf Minimum monthly requirement per turkey (gram)}}\\\cline{2-3}**
      & {\bf Brand 1} & {\bf Brand 2} &   \\ \hline
     {\bf A} & 5 & 10 & 90  \\ 
     {\bf B} & 4 & 3 & 48  \\ 
     {\bf C} & 18 & 0 & 1 \\   
     {\bf Cost per kg} & 2c & 3c &  \\ \hline  
\end{tabular}
\caption{\label{table:one}Turkey Feed}
\end{center}
\end{table}

underfull \hbox (badness 10000) Composition of
underfull \hbox (badness 2103) minimum monthly
underfull \hbox (badness 10000) requirement per

请您帮忙处理这些坏的盒子。

谢谢

答案1

您可以通过从包\RaggedRight中添加以下内容来消除它们ragged2e

在此处输入图片描述

笔记:

代码:

\documentclass{article}
\usepackage{multirow}
\usepackage{ragged2e}

\begin{document}
\begin{table}[h]
    \centering
    \renewcommand{\arraystretch}{1.5}
    \renewcommand{\tabcolsep}{0.2cm}
    \begin{tabular}{|c|c|c|c|}
    \hline
     **\multirow{3}*{{\bfseries Ingredients}} & \multicolumn{2}{|p{3cm}|}{\bfseries\RaggedRight Composition of each kg of feed (gram)} & \multicolumn{1}{|p{3.5cm}|}{\bfseries\RaggedRight Minimum monthly requirement per turkey (gram)}\\\cline{2-3}**
      & {\bfseries Brand 1} & {\bfseries Brand 2} &   \\ \hline
     {\bfseries A} & 5 & 10 & 90  \\ 
     {\bfseries B} & 4 & 3 & 48  \\ 
     {\bfseries C} & 18 & 0 & 1 \\   
     {\bfseries Cost per kg} & 2c & 3c &  \\ \hline  
\end{tabular}
\caption{\label{table:one}Turkey Feed}
\end{table}
\end{document}

相关内容