\documentclass[a4paper,fleqn]{cas-sc}
%\usepackage{float}
%\usepackage{flafter}
\usepackage{booktabs,siunitx}
\begin{document}
\begin{table*}%[!htbp]
\centering
\caption{Day ahead accuracy assessment of electricity demand forecasting on US utility GEFCOM-2012}
\label{tab:Day_ahead_Accuracy}
\begin{tabular}{@{} l *{12}{c} @{}}
\toprule
Hours &
\multicolumn{12}{c}{US utility GEFCOM-2012} \\
\cmidrule(lr){2-13} %\cmidrule(l){10-17}
&
\multicolumn{3}{c}{ANN} &
\multicolumn{3}{c@{}}{LSTM} &
\multicolumn{3}{c}{CRBM} &
\multicolumn{3}{c}{FCDBN} \\
\cmidrule(lr){2-4} \cmidrule(l){5-7} \cmidrule(l){8-10} \cmidrule(l){11-13} %\cmidrule(l){10-11} \cmidrule(l){12-13} \cmidrule(l){14-15} \cmidrule(l){16-17}
& {\thead{MAPE}} & {\thead{RMSE}} & {\thead{r}} & {\thead{MAPE}} & {\thead{RMSE}} & {\thead{r}}& {\thead{MAPE}} & {\thead{RMSE}} & {\thead{r}} & {\thead{MAPE}} & {\thead{RMSE}} & {\thead{r}} \\
\midrule
01 & 4.81 & 30.1 & 0.325 & 3.35 & 25.3 & 0.500 & 1.08 & 20.5 & 0.725 & 0.54 & 12.5 & 0.930 \\
02 & 4.84 & 28.4 & 0.625 & 2.80 & 28.9 & 0.590 & 1.11 & 18.9 & 0.756 & 0.63 & 11.2 & 0.990 \\
\bottomrule
\end{tabular}
\end{table*}
\end{document}
答案1
第一个错误是长度\bibsep
未定义(但这似乎是类中的一个问题,它是在未定义的情况下设置的)
然后你使用一个命令,\thead
错误消息显示它只能在行之间\noalign
使用,而不能在每个单元格中使用。我猜了一个定义,并在这里改成了一个新命令。\hline
\theadb
\documentclass[a4paper,fleqn]{cas-sc}
%\usepackage{float}
%\usepackage{flafter}
\newlength\bibsep % ??
\newcommand\theadb[1]{\multicolumn{1}{c}{\bfseries #1}}
\usepackage{booktabs,siunitx}
\begin{document}
\begin{table*}%[!htbp]
\centering
\caption{Day ahead accuracy assessment of electricity demand forecasting on US utility GEFCOM-2012}
\label{tab:Day_ahead_Accuracy}
\begin{tabular}{@{} l *{12}{c} @{}}
\toprule
Hours &
\multicolumn{12}{c}{US utility GEFCOM-2012} \\
\cmidrule(lr){2-13} %\cmidrule(l){10-17}
&
\multicolumn{3}{c}{ANN} &
\multicolumn{3}{c@{}}{LSTM} &
\multicolumn{3}{c}{CRBM} &
\multicolumn{3}{c}{FCDBN} \\
\cmidrule(lr){2-4} \cmidrule(l){5-7} \cmidrule(l){8-10} \cmidrule(l){11-13} %\cmidrule(l){10-11} \cmidrule(l){12-13} \cmidrule(l){14-15} \cmidrule(l){16-17}
&\theadb{MAPE} & \theadb{RMSE} & \theadb{r} & \theadb{MAPE} & \theadb{RMSE} & \theadb{r}& \theadb{MAPE} & \theadb{RMSE} & \theadb{r} & \theadb{MAPE} & \theadb{RMSE} & \theadb{r} \\
\midrule
01 & 4.81 & 30.1 & 0.325 & 3.35 & 25.3 & 0.500 & 1.08 & 20.5 & 0.725 & 0.54 & 12.5 & 0.930 \\
02 & 4.84 & 28.4 & 0.625 & 2.80 & 28.9 & 0.590 & 1.11 & 18.9 & 0.756 & 0.63 & 11.2 & 0.990 \\
\bottomrule
\end{tabular}
\end{table*}
\end{document}