\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{The 95\% prediction interval nominal.}
\label{tab:CI}
\begin{tabular}{@{} l *{16}{c} @{}}
\toprule
Hours &
\multicolumn{8}{c}{US utility GEFCOM-2012} &
\multicolumn{8}{c@{}}{ISO-NE control area} \\
\cmidrule(lr){2-9} \cmidrule(l){10-17}
&
\multicolumn{2}{c}{ANN} &
\multicolumn{2}{c}{LSTM} &
\multicolumn{2}{c}{CRBM} &
\multicolumn{2}{c}{FCDBN} &
\multicolumn{2}{c}{ANN} &
\multicolumn{2}{c}{LSTM} &
\multicolumn{2}{c}{CRBM} &
\multicolumn{2}{c@{}}{FCDBN} \\
\cmidrule(lr){2-3} \cmidrule(l){4-5} \cmidrule(l){6-7} \cmidrule(l){8-9} \cmidrule(l){10-11} \cmidrule(l){12-13} \cmidrule(l){14-15} \cmidrule(l){16-17}
& \theadb{Lower\\ bound} & \theadb{Upper\\ bound} & \theadb{Lower\\ bound} & \theadb{Upper\\ bound} & \theadb{Lower\\ bound} & \theadb{Upper\\ bound} & \theadb{Lower\\ bound} & \theadb{Upper\\ bound} & \theadb{Lower\\ bound} & \theadb{Upper\\ bound} & \theadb{Lower\\ bound} & \theadb{Upper\\ bound} & \theadb{Lower\\ bound} & \theadb{Upper\\ bound} & \theadb{Lower\\ bound} & \theadb{Upper\\ bound} \\
\midrule
01&4.4&6.0 &3.2 &3.9 &3.0 &3.9 &1.9 &2.5 &4.5&6.4 &3.1 &3.7 &3.1 &3.9 &1.7 &2.4 \\
02&4.6&6.1 &4.5 &5.1 &4.1 &4.5 &1.6 &1.9 &4.3&6.5 &4.3 &5.2 &4.3 &4.5 &1.5 &1.8\\
\bottomrule
\end{tabular}
\end{table*}
\end{document}
答案1
我建议
\newcommand\theadb[1]{\multicolumn{1}{c}{\bfseries #1}}
在之前的答案中,它符合您给出的示例,但c
列是单行。
这里使用多行输入,因此使用类似
\newcommand\theadb[1]{%
\multicolumn{1}{c}{\bfseries\begin{tabular}{@{}c@{}} #1\end{tabular}}}
因此该单元格是一个嵌套的表格,并将\\
按您的预期工作。