excel2latex 的表格错误

excel2latex 的表格错误

下列的这次讨论,我刚刚使用转换了一个表格excel2latex,我得到了以下输出,

% Table generated by Excel2LaTeX from sheet 'Sheet2'
\begin{table}[htbp]
  \centering
  \caption{Add caption}
    \begin{tabular}{rrcccccc}
    \addlinespace
    \toprule
          &       & \multicolumn{2}{c}{VC-A} & \multicolumn{2}{c}{VC-B} &     \multicolumn{2}{c}{Difference (\%)} \\
    \midrule
    \multicolumn{2}{c}{Patterns} & Average Iterations & Maximum  Iterations & Average Iterations & Maximum  Iterations & Average & Maximum \\
    \multicolumn{1}{c}{\multirow{4}[8]{*}{Bullish}} & \multicolumn{1}{c}{1} & 29.29 & 70    & 26.30 & 30    & 11.37 & 133 \\
    \multicolumn{1}{c}{} & \multicolumn{1}{c}{2} & 29.11 & 76    & 25.58 & 30    & 13.80 & 153 \\
    \multicolumn{1}{c}{} & \multicolumn{1}{c}{3} & 32.91 & 75    & 27.52 & 30    & 19.59 & 150 \\
    \multicolumn{1}{c}{} & \multicolumn{1}{c}{4} & 33.65 & 76    & 28.16 & 30    & 19.50 & 153 \\
    \multicolumn{1}{c}{\multirow{4}[8]{*}{Bearish}} & \multicolumn{1}{c}{1} & 29.42 & 73    & 26.26 & 30    & 12.03 & 143 \\
    \multicolumn{1}{c}{} & \multicolumn{1}{c}{2} & 28.98 & 73    & 25.49 & 30    & 13.69 & 143 \\
    \multicolumn{1}{c}{} & \multicolumn{1}{c}{3} & 32.92 & 80    & 27.47 & 30    & 19.84 & 167 \\
    \multicolumn{1}{c}{} & \multicolumn{1}{c}{4} & 33.71 & 80    & 28.09 & 30    & 20.01 & 167 \\
    \bottomrule
    \end{tabular}%
  \label{tab:addlabel}%
\end{table}%

我已经安装了bookendsarray包。我收到一条错误消息

! Undefined control sequence.\@sharp ->\multirow{4}[8]{}{Bullish} ...column{1}{c}{\multirow{4}[8]{}{Bullish}}

有什么想法吗?非常感谢。

答案1

您需要包含以下软件包:书签多色多行

\usepackage{booktabs, multicol, multirow}

如果您不想使用 booktabs 包,请取消选中 excel2latex 导出对话框中的“Booktabs 样式格式”复选框。

相关内容