\documentclass{ieeeaccess}
\usepackage{cite}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{algorithmic}
\usepackage{graphicx}
\usepackage{textcomp}
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
\begin{document}
\titlepgskip=-15pt
\maketitle
\section{Introduction}
\begin{table}[ht]
\centering
\caption{Evaluation of the proposed}
\label{tab:Y_Forecast}
\setlength{\tabcolsep}{0pt}
\sisetup{round-mode=places,
round-precision=2,
table-format=1.2,
}
\begin{tabula}{\columnwidth}{@{\extracolsep{\fill}} l *{4}{S} }
\toprule
& \multicolumn{4}{c}{Proposed and benchmark forecast models} \\
\cmidrule{2-5}
\thead{Months}
& {\thead{SDPSO-ELM \\ MAPE \\(\%)}}
& {\thead{F-RBF-CNN\\ MAPE \\(\%)}}
& {\thead{SSA-SVM-CS\\ MAPE \\(\%)}}
& {\thead{FA-HELF \\ MAPE\\(\%)}} \\
\midrule
Jan & 2.22 & 1.67 & 1.55 & 0.414\\
\midrule
Avg.& 2.12 & 1.79 & 1.44 & 0.410\\
\bottomrule
\end{tabular}
\end{table}
\EOD
\end{document}
答案1
您的 MWE 存在许多问题:
- 您尚未定义内容
maketitle
(就您而言,它不相关,因此将其从 MWE 中删除) - 你没有加载包
booktabs
和makcell
表格 - 您没有加载
siunitx
用于S
列的包 \begin{tabula}{\columnwidth}{@{\extracolsep{\fill}} l *{4}{S} }
是错误的,正确的是\begin{tabular*}{\columnwidth}{@{\extracolsep{\fill}} l *{4}{S} }
,当然表格应该以\end{tabular*}
修正后的 MWE 为:
\documentclass{ieeeaccess}
\usepackage{cite}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{algorithmic}
\usepackage{graphicx}
\usepackage{textcomp}
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
\usepackage{booktabs, makecell}
\usepackage{siunitx} % <---
\begin{document}
\titlepgskip=-15pt
%\maketitle
\section{Introduction}
\begin{table}[ht]
\centering
\caption{Evaluation of the proposed}
\label{tab:Y_Forecast}
\setlength{\tabcolsep}{0pt}
\sisetup{round-mode=places,
round-precision=2,
table-format=1.2,
}
\begin{tabular*}{\columnwidth}{@{\extracolsep{\fill}} l *{4}{S} }
\toprule
& \multicolumn{4}{c}{Proposed and benchmark forecast models} \\
\cmidrule{2-5}
\thead{Months}
& {\thead{SDPSO-ELM \\ MAPE \\(\%)}}
& {\thead{F-RBF-CNN\\ MAPE \\(\%)}}
& {\thead{SSA-SVM-CS\\ MAPE \\(\%)}}
& {\thead{FA-HELF \\ MAPE\\(\%)}} \\
\midrule
Jan & 2.22 & 1.67 & 1.55 & 0.414\\
\midrule
Avg.& 2.12 & 1.79 & 1.44 & 0.410\\
\bottomrule
\end{tabular*}
\end{table}
\EOD
\end{document}