IEEE 类 latex 文件中的表代码生成错误。请帮忙

IEEE 类 latex 文件中的表代码生成错误。请帮忙
\begin{table}
\centering

\caption{{Evaluation of actual and predicted load (P.load) in terms of MAPE of our proposed FCRBM based model and existing models (AFC-ANN, Bi-level, MI-ANN) on Dayton grid data of USA.}}
\label{tableDaytown}


\setlength{\tabcolsep}{0pt}
\begin{tabular*}{\textwidth}{
  @{\extracolsep{\fill}}
  S[table-format=2.2]
  S[table-format=3.4]
  S[table-format=3.4]
  S[table-format=1.4]
  S[table-format=3.4]
  @{}
}
\toprule
 & \multicolumn{5}{c}{Proposed and existing forecast models} \\
\cmidrule{2-5}
{Hours} &
{\smash{\begin{tabular}[t]{c} Target \\ (\si{\kilo\watt}) \end{tabular}}} &
  {FCRBM} &
  {AFC-ANN} &
 {Bi-level} &
 {MI-ANN} \\
%\cmidrule{3-4}\cmidrule{5-6}\cmidrule{7-8}\cmidrule{9-10}
 &
 & {MAPE}  
 & {MAPE}  
 & {MAPE}  
 & {MAPE}  \\
 &
 & {(\%)}  
 & {(\%)}  
 & {(\%)} 
 & {(\%)} \\
\midrule
00.00 & 175.3224 & 178.5829 & 1.7112 & 168.5829 & \\ [1ex]
%    \hline

\midrule
{Avg.} &  & & 0.1180 & & \\
\bottomrule
\end{tabular*}
\end{table}

答案1

以下内容可能更接近您想要实现的目标:

与原始代码相比我所做的更改:

  • 在表格开头添加了一个缺失的列( )类型。如果第一列也包含大量数字,l则可能需要将其更改为适当的类型列。S
  • 替换\textwidth为,\columnwidth以使表格的宽度与一列一样宽,而不是两列一样宽。
  • 修正了 的错误参数table-format
  • 更改\cmidrule{2-5}\cmidrule{2-6}也使规则跨越最后一列。
  • \thead从包中使用makecell多行列标题。

在此处输入图片描述

\documentclass{IEEEtran}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{makecell}
\begin{document}


\begin{table}
\centering

\caption{Evaluation of actual and predicted load (P.load) in terms of MAPE of our proposed FCRBM based model and existing models (AFC-ANN, Bi-level, MI-ANN) on Dayton grid data of USA.}
\label{tableDaytown}


\setlength{\tabcolsep}{0pt}
\begin{tabular*}{\columnwidth}{
  @{\extracolsep{\fill}}
  l
  S[table-format=3.4]
  S[table-format=3.4]
  S[table-format=1.4]
  S[table-format=3.4]
  S[table-format=3.4]
  @{}
}
\toprule
 & \multicolumn{5}{c}{Proposed and existing forecast models} \\
\cmidrule{2-6}
{\thead{Hours}} 
    & {\thead{Target \\ (\si{\kilo\watt})}}
        & {\thead{FCRBM \\ MAPE \\(\%)}} 
            & {\thead{AFC-ANN\\ MAPE \\(\%)}} 
                & {\thead{Bi-level\\ MAPE \\(\%)}} 
                     & {\thead{MI-ANN \\ MAPE \\(\%)}} \\
\midrule
00.00 & 175.3224 & 178.5829 & 1.7112 & 168.5829 & \\ 
\midrule
{Avg.} &  & & 0.1180 & & \\
\bottomrule
\end{tabular*}
\end{table}


\end{document}

相关内容