![多行不跳过单元格](https://linux22.com/image/365548/%E5%A4%9A%E8%A1%8C%E4%B8%8D%E8%B7%B3%E8%BF%87%E5%8D%95%E5%85%83%E6%A0%BC.png)
我正在尝试使用一个包含多行的简单表格。我的 MWE 如下
\documentclass[twocolumn,epjc3]{svjour3}
\usepackage{makecell}
\usepackage{multirow}
\usepackage{amsmath}
\newcommand{\Ufour}{$^{234}$U}
\newcommand{\Ufive}{$^{235}$U}
\newcommand{\Ueight}{$^{238}$U}
\begin{document}
\begin{table*}[t]
\centering
% table caption is above the table
\caption{Summary table of the calculated correction factor values and the neutron fluxes along with the corresponding uncertainties.}
\label{tab:summary_of_factors}% Give a unique label
% For LaTeX tables use
\begin{tabular}{c|c|ccc}
\hline\noalign{\smallskip}
Sample & \makecell{Neutron Energy \\ (MeV)} & $f_\text{par}$ & $f_\text{Out/In}$ &\makecell{Neutron Flux \\ ($10^4$ neutrons/cm$^2$s)} \\
\noalign{\smallskip}\hline
\multirow{3}{*}{\Ufive} & $0.452(8)$ & $0.81(12)$ & - & $1.82(6)$ \\
$0.550(8)$ & $0.60(8)$ & - & $1.75(6)$ \\
$0.651(8)$ & $0.77(9)$ & - & $4.42(18)$ \\
\hline
\multirow{3}{*}{\Ueight} & $7.5(1)$ & $0.036(7)$ & $0.081(8)$ & $3.39(17)$ \\
$8.7(1)$ & $0.059(9)$ & $0.120(7)$ & $5.10(17)$ \\
$10.0(1)$ & $0.18(1)$ & $0.111(5)$ & $13.4(5)$ \\
\hline
\multirow{6}{*}{\Ufour} & $0.452(8)$ & $0.152(3)$ & - & $2.85(10)$ \\
$0.550(8)$ & $0.133(2)$ & - & $2.66(9)$ \\
$0.651(8)$ & $0.0.213(1)$ & - & $6.93(28)$ \\
%\hline
$7.5(1)$ & $0.029(6)$ & $0.073(4)$ & $14.4(3)$ \\
$8.7(1)$ & $0.063(7)$ & $0.117(1)$ & $19.4(3)$ \\
$10.0(1)$ & $0.242(9)$ & $0.113(3)$ & $40.4(6)$ \\
\end{tabular}
\end{table*}
\end{document}
问题是,尽管调用多行的单元格应该只包含第三个参数的内容,但实际上它以某种方式完全被忽略,如图所示
您知道可能是什么问题吗?
答案1
通过手动添加垂直空格\noalign{\smallskip}
不是一个好主意。只需使用booktabs
,它就会自动使您的表格更美观。在这种情况下不需要任何垂直管道|
。您甚至可以更进一步,使用包S
中的列类型siunitx
在小数点处对齐数字.
并进行一些其他增强。
\documentclass[twocolumn,epjc3]{svjour3}
\usepackage{makecell,booktabs}
\usepackage{multirow}
\usepackage{amsmath}
\newcommand{\Ufour}{$^{234}$U}
\newcommand{\Ufive}{$^{235}$U}
\newcommand{\Ueight}{$^{238}$U}
\begin{document}
\begin{table*}[t]
\centering
% table caption is above the table
\caption{Summary table of the calculated correction factor values and the neutron fluxes along with the corresponding uncertainties.}
\label{tab:summary_of_factors}% Give a unique label
% For LaTeX tables use
\begin{tabular}{@{}lcccc@{}} \toprule
%\noalign{\smallskip}
Sample & \makecell{Neutron Energy \\ (MeV)} & $f_\text{par}$ & $f_\text{Out/In}$ &\makecell{Neutron Flux \\ ($10^4$ neutrons/cm$^2$s)} \\ \midrule
%\noalign{\smallskip}
\multirow{3}{*}{\Ufive} & $0.452(8)$ & $0.81(12)$ & - & $1.82(6)$ \\
& $0.550(8)$ & $0.60(8)$ & - & $1.75(6)$ \\
& $0.651(8)$ & $0.77(9)$ & - & $4.42(18)$ \\ \midrule
\multirow{3}{*}{\Ueight} & $7.5(1)$ & $0.036(7)$ & $0.081(8)$ & $3.39(17)$ \\
& $8.7(1)$ & $0.059(9)$ & $0.120(7)$ & $5.10(17)$ \\
& $10.0(1)$ & $0.18(1)$ & $0.111(5)$ & $13.4(5)$ \\ \midrule
\multirow{6}{*}{\Ufour} & $0.452(8)$ & $0.152(3)$ & - & $2.85(10)$ \\
& $0.550(8)$ & $0.133(2)$ & - & $2.66(9)$ \\
& $0.651(8)$ & $0.0.213(1)$ & - & $6.93(28)$ \\
%\hline
& $7.5(1)$ & $0.029(6)$ & $0.073(4)$ & $14.4(3)$ \\
& $8.7(1)$ & $0.063(7)$ & $0.117(1)$ & $19.4(3)$ \\
& $10.0(1)$ & $0.242(9)$ & $0.113(3)$ & $40.4(6)$ \\ \bottomrule
\end{tabular}
\end{table*}
\end{document}
答案2
这应该有效:
\documentclass{article}
\usepackage{makecell}
\usepackage{multirow}
\usepackage{amsmath}
\newcommand{\Ufour}{$^{234}$U}
\newcommand{\Ufive}{$^{235}$U}
\newcommand{\Ueight}{$^{238}$U}
\begin{document}
\begin{table*}[t]
\centering
% table caption is above the table
\caption{Summary table of the calculated correction factor values and the neutron fluxes along with the corresponding uncertainties.}
\label{tab:summary_of_factors}% Give a unique label
% For LaTeX tables use
\begin{tabular}{c|c|ccc}
\hline\noalign{\smallskip}
Sample & \makecell{Neutron Energy \\ (MeV)} & $f_\text{par}$ & $f_\text{Out/In}$ &\makecell{Neutron Flux \\ ($10^4$ neutrons/cm$^2$s)} \\
\noalign{\smallskip}\hline
\multirow{3}{*}{\Ufive} & $0.452(8)$ & $0.81(12)$ & - & $1.82(6)$ \\
& $0.550(8)$ & $0.60(8)$ & - & $1.75(6)$ \\
& $0.651(8)$ & $0.77(9)$ & - & $4.42(18)$ \\
\hline
\multirow{3}{*}{\Ueight} & $7.5(1)$ & $0.036(7)$ & $0.081(8)$ & $3.39(17)$ \\
& $8.7(1)$ & $0.059(9)$ & $0.120(7)$ & $5.10(17)$ \\
& $10.0(1)$ & $0.18(1)$ & $0.111(5)$ & $13.4(5)$ \\
\hline
\multirow{6}{*}{\Ufour} & $0.452(8)$ & $0.152(3)$ & - & $2.85(10)$ \\
& $0.550(8)$ & $0.133(2)$ & - & $2.66(9)$ \\
& $0.651(8)$ & $0.0.213(1)$ & - & $6.93(28)$ \\
%\hline
& $7.5(1)$ & $0.029(6)$ & $0.073(4)$ & $14.4(3)$ \\
& $8.7(1)$ & $0.063(7)$ & $0.117(1)$ & $19.4(3)$ \\
& $10.0(1)$ & $0.242(9)$ & $0.113(3)$ & $40.4(6)$ \\
\end{tabular}
\end{table*}
\end{document}
制作这个: