答案1
- 使用的是@José Carlos Santos 的答案(+1 用于重新输入表格)作为 OP 的 MWE
- 用于表的
tabularray
包 - 省略了表格主体中的所有水平线(该表格看起来更“专业”)
\documentclass[border=3.1314592]{standalone}
\usepackage{xcolor}
\usepackage{tabularray}
\UseTblrLibrary{siunitx, varwidth}
\usepackage{etoolbox}
\newrobustcmd\B{\DeclareFontSeriesDefault[rm]{bf}{b}% %
\bfseries\color{teal}} %
\begin{document}
\begin{tblr}{hline{1,2,Z} = 1pt,
colspec={Q[r,m] | *{4}{Q[c,m,si={detect-weight, % <--
mode=text, % <--
table-format=2.2{\,\%}}]}
},
measure=vbox
}
\SetCell{c} Algorithms
& {{{JPEG\\(QF$=50)$}}} & {{{Med-Filter\\$(7\times7)$}}}
& {{{Gauss-Filter\\$(7\times7)$}}} & {{{Gauss-Noise\\$(\sigma=0.01)$}}} \\
%
Nakamura \textit{et al.} \cite{??}
& 29.51\,\% & 8.39\,\% &\B 0.00\,\% &\B 0.00\,\% \\
Primila \textit{et al.} \cite{??}
& 38.35\,\% & 26.31\,\% & 1.19\,\% & 22.75\,\% \\
Gugelmann \textit{et al.} \cite{??}
& 15.76\,\% & 8.86\,\% & 3.93\,\% & 16.14\,\% \\
Proposed
&\B 6.41\,\% &\B 1.18\,\% & 0.68\,\% & 3.37\,\% \\
\end{tblr}
\end{document}
答案2
如果你编译这个:
\documentclass[12pt]{article}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{c|cccc} \toprule
Algorithms&\begin{tabular}{c}JPEG\\(QF=50)\end{tabular}&%
\begin{tabular}{c}Med-Filter\\$7\times7$\end{tabular}&%
\begin{tabular}{c}Gau-Filter\\$7\times7$\end{tabular}&%
\begin{tabular}{c}Gau-Noise\\$\sigma=0.01$\end{tabular}\\ \midrule
Nakamura \textit{et al.} [12]&$29.51\%$&$8.39\%$&$\mathbf{0.00\%}$&$\mathbf{0.00\%}$\\ \midrule
Primila \textit{et al.} [13]&$38.35\%$&$26.31\%$&$1.19\%$&$22.75\%$\\ \midrule
Gugelmann \textit{et al.} [15]&$15.76\%$&$8.86\%$&$3.93\%$&$16.14\%$\\ \midrule
Proposed &$\mathbf{6.42\%}$&$\mathbf{1.18\%}$&$0.68\%$&$3.37\%$\\ \bottomrule
\end{tabular}
\end{document}
然后你会得到这个:
请注意,我认为那些垂直条看起来不太好。
答案3
如果您确实想将垂直规则与(水平)规则一起使用booktabs
(尽管这根本不符合的精神booktabs
,您可以{NiceTabular}
尝试nicematrix
。
\documentclass[12pt]{article}
\usepackage{booktabs}
\usepackage{nicematrix}
\begin{document}
\begin{NiceTabular}{c|cccc} \toprule
\Block{2-1}{Algorithms} & JPEG & Med-Filter & Gau-Filter & Gau-Noise \\
& (QF=50) & $7\times7$ & $7\times7$ & $\sigma=0.01$ \\ \midrule
Nakamura \textit{et al.} [12]&$29.51\%$&$8.39\%$&$\mathbf{0.00\%}$&$\mathbf{0.00\%}$\\ \midrule
Primila \textit{et al.} [13]&$38.35\%$&$26.31\%$&$1.19\%$&$22.75\%$\\ \midrule
Gugelmann \textit{et al.} [15]&$15.76\%$&$8.86\%$&$3.93\%$&$16.14\%$\\ \midrule
Proposed &$\mathbf{6.42\%}$&$\mathbf{1.18\%}$&$0.68\%$&$3.37\%$\\ \bottomrule
\end{NiceTabular}
\end{document}
您需要多次编译(因为nicematrix
在后台使用 PGF/Tikz 节点)。