表格中的错误对齐

表格中的错误对齐

下表中有两个错误消息:

\begin{table}
\begin{tabular}{lllllll}
    \hline
    & \multicolumn{3}{l}{Correlated with Normal distribution}            & \multicolumn{3}{l}{Uncorrelated with Normal distribution}      \\
    $\rho$ & $0\%$                & $3\%$                & $5\%$                & $0\%$               & $3%$                & $5\%$              \\ \hline
    0.0    & 2.06 (0.17)          & 2.72 (0.24)          & 3.17 (0.29)          & 1.98 (0.13)         & 2.64 (0.19)         & 3.15 (0.24)        \\
    0.3    & \textbf{2.04 (0.17)} & \textbf{2.74 (0.27)} & \textbf{3.24 (0.32)} & 1.98 (0.13)         & 2.64 (0.19)         & 3.15 (0.24)        \\
    0.5    & \textbf{2.02 (0.17)} & \textbf{2.71 (0.26)} & \textbf{3.19 (0.31)} & 1.97 (0.17)         & 2.63 (0.19)         & 3.14 (0.25)        \\
    0.7    & \textbf{2.00 (0.43)} & \textbf{2.71 (0.55)} & \textbf{3.19 (0.56)} & 1.99 (0.17)         & 2.69 (0.18)         & 3.22 (0.24)        \\
    0.9    & \textbf{1.93 (0.18)} & \textbf{2.65 (0.29)} & \textbf{3.13 (0.36)} & 1.98 (0.14)         & 2.56 (0.21)         & 3.15 (0.27)        \\ \hline
    & \multicolumn{3}{l}{Correlated with Student$-t$ distribution}       & \multicolumn{3}{l}{Uncorrelated with Student$-t$ distribution} \\
    $rho$  & $0\%$                & $3\%$                & $5\%$                & $0\%$               & $3\%$               & $5\%$              \\ \hline
    0.0    & 2.06 (0.17)          & 2.65 (0.20)          & 3.03 (0.22)          & 1.98 (0.13)         & 2.57 (0.16)         & 2.96 (0.18)        \\
    0.3    & \textbf{2.05 (0.17)} & \textbf{2.62 (0.19)} & \textbf{3.03 (0.21)} & 1.98 (0.13)         & 2.57 (0.16)         & 2.98 (0.18)        \\
    0.5    & \textbf{2.02 (0.17)} & \textbf{2.60 (0.18)} & \textbf{3.01 (0.20)} & 1.97 (0.13)         & 2.57 (0.16)         & 2.96 (0.18)        \\
    0.7    & \textbf{1.93 (0.13)} & \textbf{2.59 (0.19)} & \textbf{2.99 (0.20)} & 1.93 (0.13)         & 2.53 (0.16)         & 3.02 (0.18)        \\
    0.9    & \textbf{1.93 (0.18)} & \textbf{2.71 (1.89)} & \textbf{2.85 (0.19)} & 1.88 (0.15)         & 2.78 (0.18)         & 2.89 (0.20)        \\ \hline
\end{tabular}
 \end{table}

错误是Missing $ inserted. 0.0 &Extra alignment tab has been changed to \cr. 0.0 & 2.06 (0.17) &

答案1

\您之前在标题后的第一行漏掉了一个%。另外,您不需要数学模式3\%等,数字应该与文本样式相匹配。

\begin{table}
\begin{tabular}{@{}*7l@{}}
    \hline
    & \multicolumn{3}{l}{Correlated with Normal distribution}            & \multicolumn{3}{l@{}}{Uncorrelated with Normal distribution}      \\
    $\rho$ & 0\%                  & 3\%                  & 5\%                  & 0\%                 & 3\%                 & 5\%       \\ \hline
    0.0    & 2.06 (0.17)          & 2.72 (0.24)          & 3.17 (0.29)          & 1.98 (0.13)         & 2.64 (0.19)         & 3.15 (0.24) \\
    0.3    & \textbf{2.04 (0.17)} & \textbf{2.74 (0.27)} & \textbf{3.24 (0.32)} & 1.98 (0.13)         & 2.64 (0.19)         & 3.15 (0.24) \\
    0.5    & \textbf{2.02 (0.17)} & \textbf{2.71 (0.26)} & \textbf{3.19 (0.31)} & 1.97 (0.17)         & 2.63 (0.19)         & 3.14 (0.25) \\
    0.7    & \textbf{2.00 (0.43)} & \textbf{2.71 (0.55)} & \textbf{3.19 (0.56)} & 1.99 (0.17)         & 2.69 (0.18)         & 3.22 (0.24) \\
    0.9    & \textbf{1.93 (0.18)} & \textbf{2.65 (0.29)} & \textbf{3.13 (0.36)} & 1.98 (0.14)         & 2.56 (0.21)         & 3.15 (0.27) \\ \hline
    & \multicolumn{3}{l}{Correlated with Student$-t$ distribution}       & \multicolumn{3}{l@{}}{Uncorrelated with Student$-t$ distribution} \\
    $\rho$ & 0\%                  & 3\%                  & 5\%                  & 0\%                 & 3\%                 & 5\%       \\ \hline
    0.0    & 2.06 (0.17)          & 2.65 (0.20)          & 3.03 (0.22)          & 1.98 (0.13)         & 2.57 (0.16)         & 2.96 (0.18) \\
    0.3    & \textbf{2.05 (0.17)} & \textbf{2.62 (0.19)} & \textbf{3.03 (0.21)} & 1.98 (0.13)         & 2.57 (0.16)         & 2.98 (0.18) \\
    0.5    & \textbf{2.02 (0.17)} & \textbf{2.60 (0.18)} & \textbf{3.01 (0.20)} & 1.97 (0.13)         & 2.57 (0.16)         & 2.96 (0.18) \\
    0.7    & \textbf{1.93 (0.13)} & \textbf{2.59 (0.19)} & \textbf{2.99 (0.20)} & 1.93 (0.13)         & 2.53 (0.16)         & 3.02 (0.18) \\
    0.9    & \textbf{1.93 (0.18)} & \textbf{2.71 (1.89)} & \textbf{2.85 (0.19)} & 1.88 (0.15)         & 2.78 (0.18)         & 2.89 (0.20) \\ \hline
\end{tabular}
\end{table}

在此处输入图片描述

相关内容