表格编译错误:!放错了 \noalign。\midrule ->\noalign

表格编译错误:!放错了 \noalign。\midrule ->\noalign

我收到此错误

! 放错了 \noalign。\midrule ->\noalign

MWE 如下。其含义是将表格扩展到两列。

\documentclass[twocolumn]{svjour3}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{comment}
\usepackage[center]{caption}
\usepackage{subcaption}
\usepackage{float}
\usepackage{csquotes}
\usepackage[section]{placeins}
\usepackage{amsmath}
%Table packages
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{makecell}
\sisetup{per-mode=symbol}
\renewcommand{\theadfont}{\bfseries}
\begin{document}
\begin{table*}
% table caption is above the table
\caption{Overall summary of the output}
\label{tab:FOF data}       % Give a unique label
% For LaTeX tables use
\begin{tabularx}
                {\linewidth}{>{\raggedright\arraybackslash}p{0.5in}
                            c
                            c
                            c
                            c
                            c
                            c
                            c
                            c
                             }
\toprule
\thead{Patient\\Number} &\thead{$T_{before}$\\(week1)} & \thead{$T_{after}$\\(week1)}& \thead{$C_{week1}$}
& \thead{$C_{week2}$}& \thead{$C_{week3}$}& \thead{$C_{week4}$}& \thead{Overall\\improvement}&\thead{$T_{after}$\\(week1)}
\midrule\\
1&41&34&17.07&17.26&20.62&23.67&6.60&32 \\
\addlinespace
2&41&41&0.00&3.49&6.47&7.16&7.16&35 \\
\addlinespace
3&34&17.07&18.88&19.87&21.12&4.05&30 \\
\addlinespace
4&89&88&1.12&3.27&6.13&8.30&7.18&81 \\
\addlinespace
12&50&50&0.00&0.00&0.00&0.00&0.00&50 \\
\bottomrule
\end{tabularx}
\end{table*}
\end{document}

MS word 输出如下 这

由于我是初学者,所以无法分离 MWE 的确切软件包,也无法在文档中包含所有使用的软件包。请原谅我的无知。

相关内容