表格中有些数学公式没有自动换行,导致显示不清晰,无法正常显示,并且无法Overfull
给出警告。该如何解决?
以下是乳胶最小工作示例:
\documentclass{article}
% support for `\multirow` command
\usepackage{multirow}
\begin{document}
The following table lists the interval estimator of $ \mu_{1} - \mu_{2} $ and $ \sigma_{1}^{2} / \sigma_{2}^{2} $ with $ 1 - \alpha $ confidence interval.
\begin{table}[ht]
\caption{Interval estimator for difference of means and ratio of variance in two normal populations}
\centering
\begin{tabular}{c|c|c}
\hline
\multicolumn{2}{c|}{unknown parameter} & $ 1 - \alpha $ confidence interval \tabularnewline
\hline
\multirow{2}*{$ \mu_{1} - \mu_{2} $} & $ \sigma_{1}^{2} $, $ \sigma_{2}^{2} $ known & $ \left( \overline{X} - \overline{Y} - U_{\frac{\alpha}{2}} \sqrt{\frac{\sigma_{1}^{2}}{n_{1}} + \frac{\sigma_{2}^{2}}{n_{2}}}, \overline{X} - \overline{Y} + U_{\frac{\alpha}{2}} \sqrt{\frac{\sigma_{1}^{2}}{n_{1}} + \frac{\sigma_{2}^{2}}{n_{2}}} \right) $ \tabularnewline
\cline{2-3}
& $ \sigma_{1}^{2} $, $ \sigma_{2}^{2} $ unknown, but $ \sigma_{1}^{2} = \sigma_{2}^{2} $ & $ \left( \overline{X} - \overline{Y} - T_{\frac{\alpha}{2}} (n_{1} + n_{2} - 2) S_{\omega} \sqrt{\frac{1}{n_{1}} + \frac{1}{n_{2}}}, \overline{X} - \overline{Y} + T_{\frac{\alpha}{2}} (n_{1} + n_{2} - 2) S_{\omega} \sqrt{\frac{1}{n_{1}} + \frac{1}{n_{2}}} \right) $ \tabularnewline
\hline
\multicolumn{2}{c|}{$ \sigma_{1}^{2} / \sigma_{2}^{2} $} & $ \left( \frac{S_{1}^{2} / S_{2}^{2}}{F_{\alpha / 2} (n_{1} - 1, n_{2} - 1)}, \frac{S_{1}^{2} / S_{2}^{2}}{F_{1- \alpha / 2} (n_{1} - 1, n_{2} - 1)} \right) $ \tabularnewline
\hline
\end{tabular}
\end{table}
\end{document}
答案1
正如您所发现的,c
列类型不允许自动换行。(l
和r
列类型也是如此。)查看您发布的屏幕截图,很明显,如果材料应该适合文本块,则第 2 列和第 3 列中的某些单元格必须换行。我建议您从环境切换到tabular
环境tabularx
,并将居中版本的X
列类型应用于第 2 列和第 3 列,第 3 列的宽度是第 2 列的三倍。您现在可能已经猜到了,X
列类型允许换行。(我通过目测您的屏幕截图得出了 1:3 的宽度比;这个猜测是正确的。)
接下来,不要使用\left
and\right
来扩大第三列中的括号:结构内部不允许换行\left( ... \right)
。而是使用\Bigl(
and \Bigr)
。最后,\allowbreak
在第二行的长公式中的逗号后插入指令。
单独的评论:为了使表格材料具有更开放的“外观”,请考虑省略所有垂直线并使用更少但间距适当的水平线。
\documentclass{article}
\usepackage{amsmath,tabularx,ragged2e,booktabs}
\newcolumntype{C}{>{\Centering\arraybackslash}X}
\usepackage[skip=0.333\baselineskip]{caption} % optional
\begin{document}
\begin{table}[ht]
\caption{Interval estimator for difference of means
and ratio of variance in two normal populations}
\begin{tabularx}{\textwidth}{@{} c
>{\hsize=0.5\hsize\linewidth=\hsize}C
>{\hsize=1.5\hsize\linewidth=\hsize}C @{}}
\toprule
\multicolumn{2}{@{}l}{Unknown parameters} &
$ 1 - \alpha $ confidence interval \\
\midrule
$ \mu_1 - \mu_2 $ &
$ \sigma_1^{2} $, $ \sigma_2^{2} $ known &
$ \Bigl( \overline{X} - \overline{Y} - U_{\frac{\alpha}{2}}
\sqrt{\frac{\sigma_1^{2}}{n_1} + \frac{\sigma_2^{2}}{n_2}},\
\overline{X} - \overline{Y} + U_{\frac{\alpha}{2}}
\sqrt{\frac{\sigma_1^{2}}{n_1} + \frac{\sigma_2^{2}}{n_2}}
\Bigr) $ \\
\addlinespace
$ \mu_1 - \mu_2 $ &
$ \sigma_1^{2} $, $ \sigma_2^{2} $ unknown,
but $ \sigma_1^{2} = \sigma_2^{2} $ &
$ \Bigl( \overline{X} - \overline{Y} - T_{\alpha/2} (n_1 + n_2 - 2)
S_{\omega} \sqrt{\frac{1}{n_1} + \frac{1}{n_2}},\ \allowbreak
\overline{X} - \overline{Y} + T_{\alpha/2} (n_1 + n_2 - 2)
S_{\omega} \sqrt{\frac{1}{n_1} + \frac{1}{n_2}}
\Bigr) $ \\
\addlinespace
$ \sigma_1^{2} / \sigma_2^{2} $ & &
$ \Bigl( \frac{S_1^{2} / S_2^{2}}{F_{\alpha / 2} (n_1 - 1, n_2 - 1)},\
\frac{S_1^{2} / S_2^{2}}{F_{1- \alpha / 2} (n_1 - 1, n_2 - 1)}
\Bigr) $ \\
\bottomrule
\end{tabularx}
\end{table}
\end{document}