答案1
和tabularray
:
\documentclass{revtex4-2}
\usepackage{geometry}
\usepackage{tabularray}
\usepackage{caption}
\usepackage{lipsum}
\begin{document}
\lipsum[66]
\begin{table}[ht]
\centering
\begin{tblr}{width=0.8\linewidth,
hlines=0.4pt, vlines=0.4pt,
colspec = {l *{5}{X[c,m]}},
colsep = 4pt,
row{1} = {font=\small\bfseries},
rowsep = 3pt
}
Assumption & & \SetCell[c=2]{c} Double slit
& & Right slit & Left slit \\
$a=\#$ mm & \SetCell[r=2]{c} $\lambda$ [nm] =
& \# & \SetCell[r=2]{c} \#
& \# & \# \\
$d=\#$ mm & & \# & & \SetCell[c=2]{c} n/a
& \\
$\lambda = \#$ mm
& $a$ [mm] =& \SetCell[c=2]{c} n/a
& & \# & \# \\
\end{tblr}
\end{table}
\end{document}
答案2
与。{NiceTabular}
nicematrix
\documentclass{revtex4-2}
\usepackage{nicematrix}
\usepackage{geometry}
\usepackage{caption}
\begin{document}
\begin{table}
\small
\begin{NiceTabular}{ccwc{1cm}wc{1cm}cc}[hvlines,cell-space-limits=2pt]
\RowStyle[bold]{}
Assumption & & \multicolumn{2}{c}{Double slit} & Right slit & Left slit \\
$a=\#$ mm & \Block{2-1}{$\lambda$ [nm] = } & \# & \Block{2-1}{\#} & \# & \# \\
$d=\#$ mm & & \# & & \Block{1-2}{n/a} \\
$\lambda = \#$ mm & $a$ [mm] = & \Block{1-2}{\#} & & \# & \#
\end{NiceTabular}
\end{table}
\end{document}
您需要多次编译(因为nicematrix
在后台使用 PGF/Tikz 节点)。